author | shihong.zheng <shihong.zheng@amlogic.com> | 2019-11-20 13:15:02 (GMT) |
---|---|---|
committer | Zhi Zhou <zhi.zhou@amlogic.com> | 2019-11-22 08:28:28 (GMT) |
commit | eb60dc7c1afead3b78b738a5c832df322b43b950 (patch) | |
tree | fecaaf9dc64773cd78b11681aea7c783007559e7 | |
parent | 15e6b2e2058ecc68b66d02a97d666d71b455a061 (diff) | |
download | media_modules-eb60dc7c1afead3b78b738a5c832df322b43b950.zip media_modules-eb60dc7c1afead3b78b738a5c832df322b43b950.tar.gz media_modules-eb60dc7c1afead3b78b738a5c832df322b43b950.tar.bz2 |
mh264: fix i only not out frame. [1/1]
PD#IPTV-4993
Problem:
i_only do not ouput frames. the dpb is full.
all frames are ref pic.
Solution:
flush dpb when decode next frame.
do not check dpb error for i_only
Verify:
S905L2A
Change-Id: I6739491e56d38440d7875f679df405a44b58f2b9
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/vmh264.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index 8254fb8..3230c07 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -5582,6 +5582,10 @@ static irqreturn_t vh264_isr_thread_fn(struct vdec_s *vdec, int irq) val(p_H264_Dpb->dpb_param.dpb.top_field_pic_order_cnt)); I_flag = (p_H264_Dpb->dpb_param.l.data[SLICE_TYPE] == I_Slice) ? I_FLAG : 0; + + if ((hw->i_only & 0x2) && (I_flag & I_FLAG)) + flush_dpb(p_H264_Dpb); + if ((hw->i_only & 0x2) && (!(I_flag & I_FLAG)) && (p_H264_Dpb->mSlice.structure == FRAME)) { hw->data_flag = NULL_FLAG; @@ -5699,7 +5703,7 @@ static irqreturn_t vh264_isr_thread_fn(struct vdec_s *vdec, int irq) } else hw->reflist_error_count = 0; } - if ((error_proc_policy & 0x800) + if ((error_proc_policy & 0x800) && (!(hw->i_only & 0x2)) && p_H264_Dpb->dpb_error_flag != 0) { dpb_print(DECODE_ID(hw), 0, "dpb error %d\n", @@ -5749,6 +5753,7 @@ pic_done_proc: reset_process_time(hw); if (input_frame_based(vdec) && + (!(hw->i_only & 0x2)) && frmbase_cont_bitlevel != 0 && READ_VREG(VIFF_BIT_CNT) > frmbase_cont_bitlevel) { @@ -5823,6 +5828,7 @@ pic_done_proc: } mutex_unlock(&hw->chunks_mutex); + check_decoded_pic_error(hw); #ifdef ERROR_HANDLE_TEST if ((hw->data_flag & ERROR_FLAG) |