amlogic/vmpeg4: calculate PTS from DTS for PTS_ON_KEYFRAME

This commit is contained in:
Ray
2019-03-06 09:22:42 +01:00
committed by Dongjin Kim
parent 3dfe633fbb
commit c0792126ba

View File

@@ -165,6 +165,7 @@ static u64 vmpeg4_ratio64;
static u32 rate_detect;
static u32 vmpeg4_rotation;
static u32 fr_hint_status;
static u32 keyframe_pts_only;
static u32 total_frame;
static u32 last_vop_time_inc, last_duration;
@@ -378,7 +379,7 @@ static irqreturn_t vmpeg4_isr(int irq, void *dev_id)
}
if ((picture_type == I_PICTURE) ||
(picture_type == P_PICTURE)) {
((P_PICTURE == picture_type) && (keyframe_pts_only == 0))) {
offset = READ_VREG(MP4_OFFSET_REG);
/*2500-->3000,because some mpeg4
*video may checkout failed;
@@ -975,6 +976,8 @@ static void vmpeg4_local_init(void)
(((unsigned long) vmpeg4_amstream_dec_info.param)
>> 16) & 0xffff;
keyframe_pts_only = (u32)vmpeg4_amstream_dec_info.param & 0x100;
frame_width = frame_height = frame_dur = frame_prog = 0;
total_frame = 0;