From 2d9fbb16bcd0a443875b82853b9d11a47c48192e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 21 Oct 2023 16:37:33 +0200 Subject: [PATCH] testdmabuf: Use the actual pixel The previous code would subsample the luma channel, too. Don't do that. --- tests/testdmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testdmabuf.c b/tests/testdmabuf.c index 075906bcd5..d7596d75c3 100644 --- a/tests/testdmabuf.c +++ b/tests/testdmabuf.c @@ -145,7 +145,7 @@ y_u_v_create_buffer (uint32_t drm_format, * sub-sampling does not require proper * filtering/averaging/siting. */ - argb = *(rgb_row + x / 2 * 2); + argb = rgb_row[x]; /* * A stupid way of "sub-sampling" chroma. This does not @@ -213,7 +213,7 @@ nv12_create_buffer (uint32_t drm_format, * sub-sampling does not require proper * filtering/averaging/siting. */ - argb = *(rgb_row + x / 2 * 2); + argb = rgb_row[x]; /* * A stupid way of "sub-sampling" chroma. This does not