h265: fix dv flush black pic. [1/1]
authorshihong.zheng <shihong.zheng@amlogic.com>
Fri, 7 Aug 2020 07:23:10 +0000 (15:23 +0800)
committershihong.zheng <shihong.zheng@amlogic.com>
Fri, 7 Aug 2020 12:28:26 +0000 (20:28 +0800)
PD#SWPL-30435

Problem:
hevc dv flash black pic. dv switch
to sdr. aux data size is cleared.

Solution:
do not repeat set aux data size
when search buffer empty.
ucode gerrit: 120190
ucode commit id: dd1d41b
ucode change id: I7c9ebaf

Verify:
ah212

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

index 87629fa947944b866347cfbded0bd597c7773506..92b62cb212f7503bb409b65f4255315b2ca4539b 100644 (file)
@@ -8377,13 +8377,10 @@ static struct vframe_s *vh265_vf_get(void *op_arg)
 #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
                if (get_dbg_flag(hevc) & H265_DEBUG_DV) {
                        struct PIC_s *pic = hevc->m_PIC[vf->index & 0xff];
+                       hevc_print(hevc, 0, "pic 0x%p aux size %d:\n",
+                                       pic, pic->aux_data_size);
                        if (pic->aux_data_buf && pic->aux_data_size > 0) {
                                int i;
-                               struct PIC_s *pic =
-                                       hevc->m_PIC[vf->index & 0xff];
-                               hevc_print(hevc, 0,
-                                       "pic 0x%p aux size %d:\n",
-                                       pic, pic->aux_data_size);
                                for (i = 0; i < pic->aux_data_size; i++) {
                                        hevc_print_cont(hevc, 0,
                                                "%02x ", pic->aux_data_buf[i]);
@@ -8540,7 +8537,8 @@ static int vh265_event_cb(int type, void *data, void *op_arg)
                        if (vdec_frame_based(vdec) && (hevc->dv_duallayer == true))
                                req->dv_enhance_exist = 1;
                        hevc_print(hevc, H265_DEBUG_DV,
-                       "query dv_enhance_exist for pic (vf 0x%p, poc %d index %d) flag => %d, aux sizd 0x%x\n",
+                       "query dv_enhance_exist for (pic 0x%p, vf 0x%p, poc %d index %d) flag => %d, aux sizd 0x%x\n",
+                       hevc->m_PIC[index],
                        req->vf,
                        hevc->m_PIC[index]->POC, index,
                        req->dv_enhance_exist, req->aux_size);
index 9a79d21db68f75260437d09e4c136167bd0f4687..63e7ac4bbe023c023b2fbb30d3073bdae4fb2284 100644 (file)
Binary files a/firmware/video_ucode.bin and b/firmware/video_ucode.bin differ