[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200706215430.22859-3-jonas@kwiboo.se>
Date: Mon, 06 Jul 2020 21:54:34 +0000 (UTC)
From: Jonas Karlman <jonas@...boo.se>
To: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org
Cc: Jonas Karlman <jonas@...boo.se>,
Ezequiel Garcia <ezequiel@...labora.com>,
Hans Verkuil <hans.verkuil@...co.com>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
Tomasz Figa <tfiga@...omium.org>,
Alexandre Courbot <acourbot@...omium.org>
Subject: [PATCH v2 02/12] media: rkvdec: Ensure decoded resolution fit coded
resolution
Ensure decoded CAPTURE buffer resolution is larger or equal to the coded
OPTUPT buffer resolution.
Signed-off-by: Jonas Karlman <jonas@...boo.se>
---
Changes in v2:
- New patch
---
drivers/staging/media/rkvdec/rkvdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index 55dc27171ce4..4ab8f7e0566b 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -235,6 +235,8 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv,
pix_mp->pixelformat = coded_desc->decoded_fmts[0];
/* Always apply the frmsize constraint of the coded end. */
+ pix_mp->width = max(pix_mp->width, ctx->coded_fmt.fmt.pix_mp.width);
+ pix_mp->height = max(pix_mp->height, ctx->coded_fmt.fmt.pix_mp.height);
v4l2_apply_frmsize_constraints(&pix_mp->width,
&pix_mp->height,
&coded_desc->frmsize);
--
2.17.1
Powered by blists - more mailing lists