diff options
author | Hans Verkuil | 2015-03-07 19:04:49 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2015-04-03 01:50:14 +0200 |
commit | 96c76efae3211c7b798553602d3165b4ea34aa95 (patch) | |
tree | bc0fa36c32fd11a6cc8aadb2486606b8a52d688a /drivers/media/platform/vivid/vivid-vid-out.c | |
parent | [media] vivid-tpg: split off the pattern drawing code (diff) | |
download | kernel-qcow2-linux-96c76efae3211c7b798553602d3165b4ea34aa95.tar.gz kernel-qcow2-linux-96c76efae3211c7b798553602d3165b4ea34aa95.tar.xz kernel-qcow2-linux-96c76efae3211c7b798553602d3165b4ea34aa95.zip |
[media] vivid: add new format fields
These fields are necessary to handle the new planar formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vivid/vivid-vid-out.c')
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-out.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c index 8f081bbb7f2c..9cf036cfd3fb 100644 --- a/drivers/media/platform/vivid/vivid-vid-out.c +++ b/drivers/media/platform/vivid/vivid-vid-out.c @@ -269,9 +269,9 @@ void vivid_update_format_out(struct vivid_dev *dev) if (V4L2_FIELD_HAS_T_OR_B(dev->field_out)) dev->crop_out.height /= 2; dev->fmt_out_rect = dev->crop_out; - dev->bytesperline_out[0] = (dev->sink_rect.width * dev->fmt_out->depth) / 8; + dev->bytesperline_out[0] = (dev->sink_rect.width * dev->fmt_out->bit_depth[0]) / 8; if (dev->fmt_out->planes == 2) - dev->bytesperline_out[1] = (dev->sink_rect.width * dev->fmt_out->depth) / 8; + dev->bytesperline_out[1] = (dev->sink_rect.width * dev->fmt_out->bit_depth[0]) / 8; } /* Map the field to something that is valid for the current output */ @@ -388,9 +388,9 @@ int vivid_try_fmt_vid_out(struct file *file, void *priv, /* This driver supports custom bytesperline values */ /* Calculate the minimum supported bytesperline value */ - bytesperline = (mp->width * fmt->depth) >> 3; + bytesperline = (mp->width * fmt->bit_depth[0]) >> 3; /* Calculate the maximum supported bytesperline value */ - max_bpl = (MAX_ZOOM * MAX_WIDTH * fmt->depth) >> 3; + max_bpl = (MAX_ZOOM * MAX_WIDTH * fmt->bit_depth[0]) >> 3; mp->num_planes = fmt->planes; for (p = 0; p < mp->num_planes; p++) { if (pfmt[p].bytesperline > max_bpl) |