From 4641812202e6706442be9a50d343685e305d1214 Mon Sep 17 00:00:00 2001 From: "kuan.hu" Date: Sat, 18 Jun 2022 17:04:46 +0800 Subject: [PATCH] h265: CB2 change 265 HDR signal type. [1/1] SWPL-83432 BUG=232905331 Problem: The HDR parameter is read when the color_description_present_flag is not recognized, resulting in the wrong parameter being transmitted when the color_description_present_flag is 0. Solution: According to the HDR protocol, adjust the read logic of related parameters. Verify: adt3 Signed-off-by: kuan.hu Change-Id: I188624329fb3493eb53800ab7914b41f4a30ab35 --- drivers/frame_provider/decoder/h265/vh265.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index 9369556..516d74a 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -8513,6 +8513,13 @@ static void set_frame_info(struct hevc_state_s *hevc, struct vframe_s *vf, } if (hevc->video_signal_type & VIDEO_SIGNAL_TYPE_AVAILABLE_MASK) { vf->signal_type = pic->video_signal_type; + /* When the matrix_coeffiecents, transfer_characteristics and colour_primaries + * syntax elements are absent, their values shall be presumed to be equal to 2 + */ + if ((vf->signal_type & 0x1000000) == 0) { + vf->signal_type = vf->signal_type & 0xff000000; + vf->signal_type = vf->signal_type | 0x20202; + } if (hevc->sei_present_flag & SEI_HDR10PLUS_MASK) { u32 data; data = vf->signal_type; -- 2.20.1