h265: fix aux data drop when EOS found. [1/1]
authorshihong.zheng <shihong.zheng@amlogic.com>
Wed, 12 Aug 2020 10:51:30 +0000 (18:51 +0800)
committershihong.zheng <shihong.zheng@amlogic.com>
Thu, 13 Aug 2020 08:46:49 +0000 (16:46 +0800)
PD#SWPL-30763

Problem:
aux data drop when EOS NAL found in dv frame mode.

Solution:
set aux data size when NAL EOS found and get
dv meta data in EOS NAL search done.
ucode gerrit id: 120524
ucode change id: I76c2bce
ucode commit id: d8f1e41

Verify:
ah212

Change-Id: Ifb3b08516b9e04ce57d196930469dfe2a8d8cedb
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c
firmware/video_ucode.bin

index 6b7bb106de7a26384559f3df923c6c2858c64168..f04ff9550950a58b90d879c596d3e81e831770b5 100644 (file)
@@ -9763,6 +9763,9 @@ static void dolby_get_meta(struct hevc_state_s *hevc)
                        0, 1);
                set_aux_data(hevc,
                hevc->cur_pic, 0, 2);
+       } else if (vdec_frame_based(vdec)) {
+               set_aux_data(hevc,
+                       hevc->cur_pic, 1, 0);
        }
 }
 #endif
@@ -10314,8 +10317,7 @@ force_output:
 
                        hevc_print(hevc, 0, "get NAL_UNIT_EOS, flush output\n");
 #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
-                       if ((vdec->master || vdec->slave) &&
-                               aux_data_is_avaible(hevc)) {
+                       if ((vdec_dual(vdec)) && aux_data_is_avaible(hevc)) {
                                if (hevc->decoding_pic)
                                        dolby_get_meta(hevc);
                        }
@@ -12574,8 +12576,7 @@ static void vh265_work_implement(struct hevc_state_s *hevc,
                struct PIC_s *pic;
                hevc->eos = 1;
 #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
-               if ((vdec->master || vdec->slave) &&
-                       aux_data_is_avaible(hevc))
+               if ((vdec_dual(vdec)) && aux_data_is_avaible(hevc))
                        dolby_get_meta(hevc);
 #endif
                check_pic_decoded_error(hevc,
index 63e7ac4bbe023c023b2fbb30d3073bdae4fb2284..a36e3d7dc55adedf8af9c731f94a620b3fb694cb 100644 (file)
Binary files a/firmware/video_ucode.bin and b/firmware/video_ucode.bin differ