aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-05-23 09:42:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-03 15:01:07 -0400
commit47cf0c61aaf47f9940d3eccc64e870d7f8013590 (patch)
tree9a689fe4da008316694edadea4d101ebc866be70 /drivers/media
parentfb1fcf1779bba4c034635cc8916261a6744584a9 (diff)
[media] coda: frame stride must be a multiple of 8
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/coda.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 1f3ab53670f8..b53c74855702 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -422,8 +422,9 @@ static int vidioc_try_fmt(struct coda_dev *dev, struct v4l2_format *f)
422 v4l_bound_align_image(&f->fmt.pix.width, MIN_W, MAX_W, 422 v4l_bound_align_image(&f->fmt.pix.width, MIN_W, MAX_W,
423 W_ALIGN, &f->fmt.pix.height, 423 W_ALIGN, &f->fmt.pix.height,
424 MIN_H, MAX_H, H_ALIGN, S_ALIGN); 424 MIN_H, MAX_H, H_ALIGN, S_ALIGN);
425 f->fmt.pix.bytesperline = round_up(f->fmt.pix.width, 2); 425 /* Frame stride must be multiple of 8 */
426 f->fmt.pix.sizeimage = f->fmt.pix.width * 426 f->fmt.pix.bytesperline = round_up(f->fmt.pix.width, 8);
427 f->fmt.pix.sizeimage = f->fmt.pix.bytesperline *
427 f->fmt.pix.height * 3 / 2; 428 f->fmt.pix.height * 3 / 2;
428 } else { /*encoded formats h.264/mpeg4 */ 429 } else { /*encoded formats h.264/mpeg4 */
429 f->fmt.pix.bytesperline = 0; 430 f->fmt.pix.bytesperline = 0;