util: fix grey in YUV SMPTE patterns
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 3 Jul 2022 12:05:31 +0000 (14:05 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 8 Sep 2023 18:01:43 +0000 (18:01 +0000)
The YUV SMPTE patterns use RGB 191/192/192 instead of 192/192/192 for
the grey color in the top color bar.

Change it to 192/192/192, to match the RGB SMPTE patterns.

Fixes: a94ee624292bff96 ("modetest: Add SMPTE test pattern")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
v2:
  - Add Reviewed-by.

tests/util/pattern.c

index f45a26c..cf5c8e2 100644 (file)
@@ -162,7 +162,7 @@ static void fill_smpte_yuv_planar(const struct util_yuv_info *yuv,
                                  unsigned int height, unsigned int stride)
 {
        const struct color_yuv colors_top[] = {
-               MAKE_YUV_601(191, 192, 192),    /* grey */
+               MAKE_YUV_601(192, 192, 192),    /* grey */
                MAKE_YUV_601(192, 192, 0),      /* yellow */
                MAKE_YUV_601(0, 192, 192),      /* cyan */
                MAKE_YUV_601(0, 192, 0),        /* green */
@@ -265,7 +265,7 @@ static void fill_smpte_yuv_packed(const struct util_yuv_info *yuv, void *mem,
                                  unsigned int stride)
 {
        const struct color_yuv colors_top[] = {
-               MAKE_YUV_601(191, 192, 192),    /* grey */
+               MAKE_YUV_601(192, 192, 192),    /* grey */
                MAKE_YUV_601(192, 192, 0),      /* yellow */
                MAKE_YUV_601(0, 192, 192),      /* cyan */
                MAKE_YUV_601(0, 192, 0),        /* green */