From 4a0e4b65c2ef66411b143c73f337fa49533eaa99 Mon Sep 17 00:00:00 2001 From: Akshata Sahukar Date: Thu, 26 Aug 2021 19:56:29 -0700 Subject: [PATCH] video: driver: fix CTS V2 media DecoderColorAspectsTest color mismatch issue Since ycbcr_enc is u8 member varible, 302 value exceeds its memory range resulting in storage of incorrect matrix coefficents, and passing the same to HAL. As a result, incorrect color space info is propagated to client resulting into color mismatch issue and failing the CTS testcase. Fixed this. Change-Id: I66424c033bb4c4ad7d7528974a45a6a4b2740327 Signed-off-by: Akshata Sahukar --- include/uapi/vidc/media/v4l2_vidc_extensions.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/uapi/vidc/media/v4l2_vidc_extensions.h b/include/uapi/vidc/media/v4l2_vidc_extensions.h index fac7c2d113..5268b22d4a 100644 --- a/include/uapi/vidc/media/v4l2_vidc_extensions.h +++ b/include/uapi/vidc/media/v4l2_vidc_extensions.h @@ -42,8 +42,9 @@ #define V4L2_XFER_FUNC_VIDC_ST428 208 #define V4L2_XFER_FUNC_VIDC_HLG 209 -#define V4L2_YCBCR_VIDC_SRGB_OR_SMPTE_ST428 301 -#define V4L2_YCBCR_VIDC_FCC47_73_682 302 +/* should be 255 or below due to u8 limitation */ +#define V4L2_YCBCR_VIDC_SRGB_OR_SMPTE_ST428 241 +#define V4L2_YCBCR_VIDC_FCC47_73_682 242 /* end of vidc specific colorspace definitions */ #ifndef V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE