media_module: h264 store picture to dpb buffer when timeout status. [1/1]
authorPeng Yixin <yixin.peng@amlogic.com>
Mon, 30 Dec 2019 05:32:39 +0000 (13:32 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Sun, 5 Jan 2020 00:36:04 +0000 (16:36 -0800)
PD#OTT-7782

Problem:
For the timeout state, the driver will discards the frame,
causing the buffer reset.

Solution:
store picture to dpb buffer when timeout status.

Verify:
u212

Change-Id: If14f02fc0ac44eaf4947dd44ef66095d38941d7a
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
drivers/frame_provider/decoder/h264_multi/vmh264.c

index 251fda9ffcb6c412e6d80bcbc89d0381f76c89a7..4eb7ca2dbdecd33a58895000aedc5863b21e34e3 100644 (file)
@@ -267,8 +267,9 @@ static unsigned int i_only_flag;
        bit[12] i_only when error happen
        bit[13] 0: mark error according to last pic, 1: ignore mark error
        bit[14] 0: result done when timeout from ucode. 1: reset bufmgr when timeout.
+       bit[18] 1: time out status, store pic to dpb buffer.
 */
-static unsigned int error_proc_policy = 0x4fb6; /*0x1f14*/
+static unsigned int error_proc_policy = 0x7Cfb6; /*0x1f14*/
 
 
 /*
@@ -6114,6 +6115,9 @@ pic_done_proc:
                        (dec_dpb_status == H264_DECODE_TIMEOUT)) {
 empty_proc:
                reset_process_time(hw);
+               if ((error_proc_policy & 0x40000) &&
+                       dec_dpb_status == H264_DECODE_TIMEOUT)
+                       goto pic_done_proc;
                if (!hw->frmbase_cont_flag)
                        release_cur_decoding_buf(hw);