summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkuan.hu <kuan.hu@amlogic.com>2022-06-06 20:44:07 +0800
committerLiang Ji <liang.ji@amlogic.com>2022-06-17 20:55:34 +0800
commit34e0f6d15f32256e998027b6774171d5a4d418e7 (patch)
tree48aeea3386676d05b11bc43bc6a28b9e2e850c8d
parent47914e15db3810a9601e2310127bea2d8312e202 (diff)
downloadmedia_modules-34e0f6d15f32256e998027b6774171d5a4d418e7.tar.gz
decoder: CB2 hdr information is acquired abnormally. [1/1]
PD#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 <kuan.hu@amlogic.com> Change-Id: I5694100d826afc32674074f1e5508ab05f7dadb0
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c7
-rw-r--r--drivers/frame_provider/decoder/h265/vh265.c7
-rw-r--r--drivers/frame_provider/decoder/vav1/vav1.c7
3 files changed, 20 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c
index 9150d19..4ffa894 100644
--- a/drivers/frame_provider/decoder/h264_multi/vmh264.c
+++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c
@@ -6547,7 +6547,12 @@ static irqreturn_t vh264_isr_thread_fn(struct vdec_s *vdec, int irq)
((video_signal & 0xff0000) >> 16) |
((video_signal & 0x3f000000));
-
+ /* When the matrix_coeffiecents, transfer_characteristics and colour_primaries
+ * syntax elements are absent, their values shall be presumed to be equal to 2
+ */
+ if ((hw->video_signal_from_vui & 0x100000) == 0) {
+ hw->video_signal_from_vui = (hw->video_signal_from_vui & 0xfff00000) | 0x20202;
+ }
/*dpb_print(DECODE_ID(hw),
0,
"video_signal_from_vui:0x%x, "
diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c
index 9369556..7ef22cb 100644
--- a/drivers/frame_provider/decoder/h265/vh265.c
+++ b/drivers/frame_provider/decoder/h265/vh265.c
@@ -11363,6 +11363,13 @@ force_output:
}
#endif
hevc->video_signal_type = (v << 16) | c;
+
+ /* When the matrix_coeffiecents, transfer_characteristics and colour_primaries
+ * syntax elements are absent, their values shall be presumed to be equal to 2
+ */
+ if ((hevc->video_signal_type & 0x100000) == 0) {
+ hevc->video_signal_type = (hevc->video_signal_type & 0xfff00000) | 0x20202;
+ }
video_signal_type = hevc->video_signal_type;
}
diff --git a/drivers/frame_provider/decoder/vav1/vav1.c b/drivers/frame_provider/decoder/vav1/vav1.c
index e7ee9f5..b722611 100644
--- a/drivers/frame_provider/decoder/vav1/vav1.c
+++ b/drivers/frame_provider/decoder/vav1/vav1.c
@@ -8533,6 +8533,13 @@ static irqreturn_t vav1_isr_thread_fn(int irq, void *data)
hw->video_signal_type = (hw->aom_param.p.video_signal_type << 16
| hw->aom_param.p.color_description);
+ /* When the matrix_coeffiecents, transfer_characteristics and colour_primaries
+ * syntax elements are absent, their values shall be presumed to be equal to 2
+ */
+ if ((hw->video_signal_type & 0x100000) == 0) {
+ hw->video_signal_type = (hw->video_signal_type & 0xfff00000) | 0x20202;
+ }
+
if (next_lcu_size != hw->current_lcu_size) {
av1_print(hw, AOM_DEBUG_HW_MORE,
" ## lcu_size changed from %d to %d\n",