[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09726b7e-4ac4-4ebe-b1eb-4d142c2ee0fb@jjverkuil.nl>
Date: Sun, 27 Apr 2025 11:45:24 +0200
From: Hans Verkuil <hans@...erkuil.nl>
To: Matthew Majewski <mattwmajewski@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>, Hans Verkuil
<hverkuil@...all.nl>, Uwe Kleine-Konig <u.kleine-koenig@...libre.com>,
Shuah Khan <skhan@...uxfoundation.org>,
Jacopo Mondi <jacopo.mondi@...asonboard.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Naushir Patuck <naush@...pberrypi.com>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] media: vim2m: add multiplanar API support
Hi Matthew,
On 04/03/2025 20:16, Matthew Majewski wrote:
> Hi everyone,
>
> This patch series adds multiplane API support for the virtual M2M
> driver, along with some minor driver refactoring/improvements.
>
> I followed the lead of the vivid driver and made multiplanar support
> selectable with a module parameter, and the default is to use the
> single planar api.
>
> Although there are not yet any pixelformats in the driver that make
> use of multiple memory planes, adding support for these should be
> easier now with the API level changes taken care of.
Are you planning follow-up patches adding support for at least one
multiplanar format? That would be really nice.
Regards,
Hans
>
> v4l2-compliance reports the following with multiplane support disabled:
>
> Total for vim2m device /dev/video0: 48, Succeeded: 48, Failed: 0, Warnings: 0
>
> and the same with multiplane support enabled:
>
> Total for vim2m device /dev/video0: 48, Succeeded: 48, Failed: 0, Warnings: 0
>
> Patches need to be applied in increasing numerical order (Patch [3/3]
> depends on [1/3] and [2/3]).
>
> Since the multi-plane changes had to touch a lot of the driver, I did
> a basic regression test with the following script which generates a
> test input image with vivid and an output image from vim2m for each
> supported format. I confirmed all outputs visually and verified they
> were identical to the outputs before the change. Testing was done on
> an x86_64 qemu image.
>
> #!/bin/sh
>
> # tested with HDMI vivid emulation
> # modprobe vivid num_inputs=1 input_types=3
>
> vim2m=/dev/video0
> vivid=/dev/video1
>
> width=640
> height=480
> out_width=320
> out_height=240
>
> capture_formats=$(v4l2-ctl -d $vim2m --list-formats | awk '/\]:/ {print $2}' | sed "s/'//g")
> output_formats=$(v4l2-ctl -d $vim2m --list-formats-out | awk '/\]:/ {print $2}' | sed "s/'//g")
>
> # Turn off text mode so that images will be identical
> v4l2-ctl -d $vivid -c osd_text_mode=2
>
> for ofmt in ${output_formats}; do
> # generate input image
> inname="${width}x${height}.${ofmt}"
> v4l2-ctl -d $vivid -v pixelformat=$ofmt,width=$width,height=$height,field=none \
> --stream-mmap --stream-count=1 --stream-to=$inname
> for cfmt in ${capture_formats}; do
> outname="${out_width}x${out_height}-out.${cfmt}"
> v4l2-ctl -d $vim2m -x pixelformat=$ofmt,width=$width,height=$height \
> -v pixelformat=$cfmt,width=$out_width,height=$out_height \
> --stream-from=$inname --stream-to=$outname --stream-mmap --stream-out-mmap \
> --stream-count=1
> done
> done
>
> Matthew Majewski (3):
> media: v4l2-common: Add RGBR format info
> media: vim2m: Simplify try_fmt
> media: vim2m: Add parametized support for multiplanar API
>
> drivers/media/test-drivers/vim2m.c | 327 +++++++++++++++++++++-----
> drivers/media/v4l2-core/v4l2-common.c | 1 +
> 2 files changed, 274 insertions(+), 54 deletions(-)
>
Powered by blists - more mailing lists