[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZbvXV-1hrfXLcvC3@localhost.localdomain>
Date: Thu, 1 Feb 2024 18:39:35 +0100
From: Louis Chauvet <louis.chauvet@...tlin.com>
To: Arthur Grillo <arthurgrillo@...eup.net>
Cc: Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...il.com>,
Haneen Mohammed <hamohammed.sa@...il.com>,
Harry Wentland <harry.wentland@....com>,
Jonathan Corbet <corbet@....net>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
MaĆra Canal <mairacanal@...eup.net>,
Melissa Wen <melissa.srw@...il.com>,
Rodrigo Siqueira <rodrigosiqueiramelo@...il.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-doc@...r.kernel.org, nicolejadeyee@...gle.com,
seanpaul@...gle.com, thomas.petazzoni@...tlin.com,
miquel.raynal@...tlin.com
Subject: Re: [PATCH v2 4/7] drm/vkms: Add chroma subsampling
[...]
> @@ -146,18 +149,23 @@ void vkms_compose_row(struct line_buffer *stage_buffer, struct vkms_plane_state
> for (size_t x = 0; x < limit; x++) {
> int x_pos = get_x_position(frame_info, limit, x);
>
> + bool shoud_inc = !((x + 1) % frame_format->num_planes);
I think this line will break if the subsampling is not the same as the
plane count. For NV12 it works only because there are two planes and
hsub=2/vsub=2, but I believe NV24 will not work because of plane 2, as
we need to increment x at the same speed on all planes.
I have a proposal to solve this issue (see my patchset applying on top of
yours). You probably at least need to use .hsub/vsub to
increment/decrement properly src_pixels pointer.
Currently the tests pass for it because it only use "horizontal
lines" and "full color" pictures.
In the series [1] I proposed to change the pattern to detect this kind of
issue.
[...]
[1]: https://lore.kernel.org/dri-devel/20240201-yuv-v1-0-3ca376f27632@bootlin.com/T/#t
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists