author | shihong.zheng <shihong.zheng@amlogic.com> | 2019-10-25 03:30:13 (GMT) |
---|---|---|
committer | shihong.zheng <shihong.zheng@amlogic.com> | 2019-10-25 03:36:49 (GMT) |
commit | b85dd03459445af9c870c4df084b7d26936e28b7 (patch) | |
tree | 07621673917252df126f40118fce19ee0d0e833b | |
parent | 4c3eb8b21aefebf9ad79c90cc9d37c1a9e69d8ca (diff) | |
download | media_modules-b85dd03459445af9c870c4df084b7d26936e28b7.zip media_modules-b85dd03459445af9c870c4df084b7d26936e28b7.tar.gz media_modules-b85dd03459445af9c870c4df084b7d26936e28b7.tar.bz2 |
mpeg2: fix mosaics when set error_skip. [1/1]
PD#SWPL-12375
Problem:
mpeg2 mosaics after set error_frame_skip_level to 2.
a error p frame store to ref list, so have not set
error skip flag in error_skip(). the next mosaic b frame
display before p.
Solution:
set b frame error when error p in ref list.
set error_frame_skip_level to 2 default.
Verify:
u212
Change-Id: Ide23f0cf8a5f6ef72e1a6a6e129a7f7f1ef658fa
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c b/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c index a6f25be..6f64b7c 100644 --- a/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c +++ b/drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c @@ -106,7 +106,7 @@ static u32 buf_size = 32 * 1024 * 1024; static int pre_decode_buf_level = 0x800; static u32 dec_control; -static u32 error_frame_skip_level; +static u32 error_frame_skip_level = 2; static u32 stat; static u32 udebug_flag; static unsigned int radr; @@ -1409,6 +1409,15 @@ static int update_reference(struct vdec_mpeg12_hw_s *hw, return index; } +static bool is_ref_error(struct vdec_mpeg12_hw_s *hw) +{ + if ((hw->pics[hw->refs[0]].buffer_info & PICINFO_ERROR) || + (hw->pics[hw->refs[1]].buffer_info & PICINFO_ERROR)) + return 1; + return 0; +} + + static irqreturn_t vmpeg12_isr_thread_fn(struct vdec_s *vdec, int irq) { u32 reg, index, info, seqinfo, offset, pts, frame_size, tmp; @@ -1537,6 +1546,11 @@ static irqreturn_t vmpeg12_isr_thread_fn(struct vdec_s *vdec, int irq) hw->frame_prog = 0; force_interlace_check(hw); + if (is_ref_error(hw)) { + if ((info & PICINFO_TYPE_MASK) == PICINFO_TYPE_B) + new_pic->buffer_info |= PICINFO_ERROR; + } + if (((info & PICINFO_TYPE_MASK) == PICINFO_TYPE_I) || ((info & PICINFO_TYPE_MASK) == PICINFO_TYPE_P)) { index = update_reference(hw, index); |