I see following error: igt_fb.c:1382:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] 1382 | rgb->d[0] = rgb24[2]; | ~~~~~~~~~~^~~~~~~~~~ igt_fb.c:1549:20: note: while referencing 'rgb' 1549 | struct igt_vec4 rgb[2]; | ^~~ igt_fb.c:1383:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] 1383 | rgb->d[1] = rgb24[1]; | ~~~~~~~~~~^~~~~~~~~~ igt_fb.c:1549:20: note: while referencing 'rgb' 1549 | struct igt_vec4 rgb[2]; | ^~~ igt_fb.c:1384:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] 1384 | rgb->d[2] = rgb24[0]; | ~~~~~~~~~~^~~~~~~~~~ igt_fb.c:1549:20: note: while referencing 'rgb' 1549 | struct igt_vec4 rgb[2]; | ^~~ igt_fb.c:1385:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds] 1385 | rgb->d[3] = 1.0f; | ~~~~~~~~~~^~~~~~ igt_fb.c:1549:20: note: while referencing 'rgb' 1549 | struct igt_vec4 rgb[2]; | ^~~ I guess it's a typo and should be fixed by: diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 8244e517..5cd1829a 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1779,7 +1779,7 @@ static void convert_rgb24_to_nv12(struct fb_convert *cvt) struct igt_vec4 yuv[2]; read_rgb(&rgb[0], &rgb24[j * 8 + 0]); - read_rgb(&rgb[2], &rgb24[j * 8 + 0 + rgb24_stride]); + read_rgb(&rgb[1], &rgb24[j * 8 + 0 + rgb24_stride]); yuv[0] = igt_matrix_transform(&m, &rgb[0]); yuv[1] = igt_matrix_transform(&m, &rgb[1]);
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/f01796214bbde31e37b0593e547ad9436fdd02ba Thanks for the report
Reported - can you confirm that your problem is resolved?
(In reply to Radosław Szwichtenberg from comment #2) > Reported - can you confirm that your problem is resolved? Yes, thank you for the fix.
Hmm. Looks a bit strange to me. Shouldn't this be read_rgb(&rgb[1], &rgb24[j * 8 + 4]); as in /* Convert 2x1 pixel blocks */ ?
Created attachment 143068 [details] [review] 0001-lib-fb-Fix-rgb24-to-nv12-conversion-once-more.patch
Created attachment 143069 [details] [review] 0001-lib-fb-Fix-rgb24-to-nv12-conversion-once-more.patch with Signed-off-by ...
(In reply to Stefan Dirsch from comment #6) > Created attachment 143069 [details] [review] [review] > 0001-lib-fb-Fix-rgb24-to-nv12-conversion-once-more.patch > > with Signed-off-by ... The current code looks correct to me.
First bugfix applied, Ville doesn't think action is required for the second; good enough for me.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.