v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
Commit Message
Image size for MFC encoder should have size between
8x4 and 1920x1080 with even width and height.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/media/video/s5p-mfc/s5p_mfc_enc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
Comments
Hi Andrzej,
Thank you for the patch.
Best wishes,
--
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center
> -----Original Message-----
> From: Andrzej Hajda [mailto:a.hajda@samsung.com]
> Sent: 14 June 2012 09:11
> To: linux-media@vger.kernel.org
> Cc: Hans Verkuil; Marek Szyprowski; Kamil Debski; Andrzej Hajda; Kyungmin
> Park
> Subject: [PATCH] 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 <a.hajda@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
> ---
> drivers/media/video/s5p-mfc/s5p_mfc_enc.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
> b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c
> index 9c19aa8..03d8334 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;
> --
> 1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -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;