vmh264: video playback stutter issue [1/1]
authorHui Zhang <hui.zhang@amlogic.com>
Wed, 6 May 2020 11:57:30 +0000 (19:57 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Tue, 26 May 2020 07:29:43 +0000 (00:29 -0700)
PD#SWPL-25348

Problem:
this stream has wrong duration info inside vui.
it cause video display not smooth

Solution:
add a limit when variable frame rate and duraion is
adnormal. force set duration to a normal

Verify:
U215

Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Change-Id: I164e6d59f622f0cc5247c2d929f7e2693a16f6bd

drivers/frame_provider/decoder/h264_multi/vmh264.c

index 99e51cba7732522466feead0118297fc922a1470..459bd48f9e3378fd8e239cb1099fd231bbe39e45 100644 (file)
@@ -5086,6 +5086,10 @@ static void vui_config(struct vdec_h264_hw_s *hw)
                                                FIX_FRAME_RATE_OFF;
                                        hw->pts_duration = 0;
                                        hw->frame_dur = frame_dur_es;
+                                       if (!hw->fixed_frame_rate_flag && (p_H264_Dpb->mSPS.profile_idc != BASELINE)) {
+                                               if (frame_dur_es == 7680)
+                                                       hw->frame_dur = frame_dur_es /2;
+                                       }
                                        vdec_schedule_work(&hw->notify_work);
                                        dpb_print(DECODE_ID(hw),
                                                PRINT_FLAG_DEC_DETAIL,