lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f42f85b801f9fc74e5cc1cee5984e9fc44f63ada.camel@collabora.com>
Date: Fri, 25 Oct 2024 13:46:55 -0400
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Jonas Karlman <jonas@...boo.se>, Sebastian Fricke
 <sebastian.fricke@...labora.com>, Ezequiel Garcia
 <ezequiel@...guardiasur.com.ar>, Mauro Carvalho Chehab
 <mchehab@...nel.org>,  Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Hans Verkuil <hverkuil-cisco@...all.nl>, Boris Brezillon
 <boris.brezillon@...labora.com>
Cc: Alex Bee <knaerzche@...il.com>, Benjamin Gaignard
 <benjamin.gaignard@...labora.com>, Detlev Casanova
 <detlev.casanova@...labora.com>, Dan Carpenter <dan.carpenter@...aro.org>, 
 linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org, 
 linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org, Mauro Carvalho
 Chehab <mchehab+huawei@...nel.org>
Subject: Re: [PATCH v6 11/11] media: rkvdec: Fix enumerate frame sizes

Le lundi 09 septembre 2024 à 19:25 +0000, Jonas Karlman a écrit :
> The VIDIOC_ENUM_FRAMESIZES ioctl should return all frame sizes (i. e.
> width and height in pixels) that the device supports for the given pixel
> format.
> 
> For coded format returning the frame size used to enforce HW alignment
> requirements for CAPTURE buffers does not make fully sense.
> 
> Instead, signal applications what the maximum frame size that is
> supported by the HW decoder using a frame size of continuous type.
> 
> Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
> Suggested-by: Alex Bee <knaerzche@...il.com>
> Signed-off-by: Jonas Karlman <jonas@...boo.se>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>

> ---
> v6:
> - New patch
> 
> With this change FFmpeg V4L2 Request API hwaccels can implement a strict
> check if frame size is supported by the video device:
> https://ffmpeg.org/pipermail/ffmpeg-devel/2024-August/332037.html
> ---
>  drivers/staging/media/rkvdec/rkvdec.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
> index c8c14f35ac44..9002eb3a59e5 100644
> --- a/drivers/staging/media/rkvdec/rkvdec.c
> +++ b/drivers/staging/media/rkvdec/rkvdec.c
> @@ -334,8 +334,14 @@ static int rkvdec_enum_framesizes(struct file *file, void *priv,
>  	if (!fmt)
>  		return -EINVAL;
>  
> -	fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
> -	fsize->stepwise = fmt->frmsize;
> +	fsize->type = V4L2_FRMSIZE_TYPE_CONTINUOUS;
> +	fsize->stepwise.min_width = 1;
> +	fsize->stepwise.max_width = fmt->frmsize.max_width;
> +	fsize->stepwise.step_width = 1;
> +	fsize->stepwise.min_height = 1;
> +	fsize->stepwise.max_height = fmt->frmsize.max_height;
> +	fsize->stepwise.step_height = 1;
> +
>  	return 0;
>  }
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ