From 0749ae350133204c2562c69f4265842141cacf12 Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Tue, 12 Jun 2012 09:46:26 -0300 Subject: [PATCH] [media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT Image size for MFC encoder should have size between 8x4 and 1920x1080 with even width and height. Signed-off-by: Andrzej Hajda Signed-off-by: Kyungmin Park Signed-off-by: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/s5p-mfc/s5p_mfc_enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c index 9c19aa8038dd..03d83340e7fb 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c @@ -901,6 +901,8 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f) mfc_err("failed to try output format\n"); return -EINVAL; } + v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1, + &pix_fmt_mp->height, 4, 1080, 1, 0); } else { mfc_err("invalid buf type\n"); return -EINVAL; -- 2.30.2