Message ID | 20220328195936.82552-17-nicolas.dufresne@collabora.com (mailing list archive) |
---|---|
State | Superseded |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1nYvXm-009srN-5Z; Mon, 28 Mar 2022 20:00:50 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344277AbiC1UC0 (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 28 Mar 2022 16:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344273AbiC1UCD (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 28 Mar 2022 16:02:03 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417F853A45; Mon, 28 Mar 2022 13:00:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id 963391F4388C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648497612; bh=Y/EFmW32eD4KkKmhvAOQSjuBN39ky/laGXZQlpMupCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bSgtdbGw4tYbD69RdtJrdkBRkEuQp47VMh2KzTtJdxoliJAInHWpAHa19MWxP+ef7 8+GEh/+RSK3v3aF5PfKNrNUqd8rGHpodqKNHRdiTz1R8P9f4Ov4nFjly0Wk7J0y2KL ebN8TluDyF/oyUDQjHticp2yjGFipQF4zAyFzAqMG8CfzypxRAqXv+br4WHoTNwEjv P6RrkSI/k+dhLbroD+xeNFri+pu9XFzpF62MkVHgPTQ4nnYpVB6DfMiWOJSEZ4+rGJ ydKvI6bNa+vrgIfidR0R1xXfsNdXWfyLSjqgVojDmoT2bhEoooxxac6gjk4LUS5x4u htRTV+HcbUkHg== From: Nicolas Dufresne <nicolas.dufresne@collabora.com> To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>, Mauro Carvalho Chehab <mchehab@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: kernel@collabora.com, Jonas Karlman <jonas@kwiboo.se>, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v1 16/24] media: rkvdec: Ensure decoded resolution fit coded resolution Date: Mon, 28 Mar 2022 15:59:28 -0400 Message-Id: <20220328195936.82552-17-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220328195936.82552-1-nicolas.dufresne@collabora.com> References: <20220328195936.82552-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no |
Series |
[v1,01/24] media: h264: Increase reference lists size to 32
|
|
Commit Message
Nicolas Dufresne
March 28, 2022, 7:59 p.m. UTC
From: Jonas Karlman <jonas@kwiboo.se> Ensure decoded CAPTURE buffer resolution is larger or equal to the coded OPTUPT buffer resolution. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> --- drivers/staging/media/rkvdec/rkvdec.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
Hey Nicolas, On 28.03.2022 15:59, Nicolas Dufresne wrote: >From: Jonas Karlman <jonas@kwiboo.se> > >Ensure decoded CAPTURE buffer resolution is larger or equal to the coded >OPTUPT buffer resolution. s/OPTUPT/OUTPUT/ > >Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com> >--- > 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 05824f1997f7..22c0382c579e 100644 >--- a/drivers/staging/media/rkvdec/rkvdec.c >+++ b/drivers/staging/media/rkvdec/rkvdec.c >@@ -269,6 +269,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. */ s/frmsize/framesize/ s/constraint/constraints/ s/coded end/coded format/ Greetings, Sebastian >+ 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.34.1 >
Hey Nicolas, Also typo in title: s/Ensure decoded resolution fit coded resolution/ Ensure decoded resolution fits coded resolution/ Greetings, Sebastian On 29.03.2022 17:39, Sebastian Fricke wrote: >Hey Nicolas, > >On 28.03.2022 15:59, Nicolas Dufresne wrote: >>From: Jonas Karlman <jonas@kwiboo.se> >> >>Ensure decoded CAPTURE buffer resolution is larger or equal to the coded >>OPTUPT buffer resolution. > >s/OPTUPT/OUTPUT/ > >> >>Signed-off-by: Jonas Karlman <jonas@kwiboo.se> >Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com> > >>--- >>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 05824f1997f7..22c0382c579e 100644 >>--- a/drivers/staging/media/rkvdec/rkvdec.c >>+++ b/drivers/staging/media/rkvdec/rkvdec.c >>@@ -269,6 +269,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. */ > >s/frmsize/framesize/ >s/constraint/constraints/ >s/coded end/coded format/ > >Greetings, >Sebastian > >>+ 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.34.1 >>
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 05824f1997f7..22c0382c579e 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -269,6 +269,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);