mesa-drm/tests/util
Dave Stevenson d06ea82901 util: pattern: Fix chroma offset for insert_value_yuv_planar
The chroma offset calculation resulted in the running beyond
the end of the buffer.

eg For ysub=2, y=0 and y=1 should result in writing the same U & V
line, but chroma_offset = (y + 1) / ysub; resulted in them going
to different lines, potentially running off the end of the buffer
and causing a seg fault.

Update the calculation so lines 0 to (ysub-1) all write the same
output line.

Fixes: 40aeab6fd5 ("modetest: util: pattern: add new patterns")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2026-03-03 13:12:04 +00:00
..
Android.bp modetest: Make modetest availble to vendor on Android 2024-10-29 10:49:10 -06:00
Android.sources.bp Convert to Android.bp 2024-07-29 14:47:30 -04:00
common.h tests: Split helpers into library 2015-12-18 17:43:40 +00:00
format.c modetest: add support for YUV422 and YUV444 plane format 2024-09-23 21:11:29 +02:00
format.h util: store number of colors for indexed formats 2023-10-24 09:44:21 +02:00
kms.c tests/util: Call drmGetDevices2() instead of drmOpen()ing all modules 2024-09-03 13:30:41 +02:00
kms.h tests: use drmModeGetConnectorTypeName 2022-07-02 20:13:29 +00:00
meson.build Add meson build system 2018-01-12 09:40:48 -08:00
pattern.c util: pattern: Fix chroma offset for insert_value_yuv_planar 2026-03-03 13:12:04 +00:00
pattern.h modetest: util: add seed argument for noise patterns 2025-06-09 09:31:02 +02:00