video: reuse initial phase [1/1]
authorshuanglong.wang <shuanglong.wang@amlogic.com>
Wed, 20 Mar 2019 08:25:57 +0000 (16:25 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Sat, 30 Mar 2019 12:58:06 +0000 (05:58 -0700)
PD#SWPL-5664

Problem:
for netflix 23.97fps non-tunnle playback 3:2 patten broken so many times

Solution:
reuse initial phase that Tim use in amazon

Verify:
verify by u212

Change-Id: I5d988e1c3a3dbf1bb728f55a921e8b8fb6990985
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index 1611b32..c00ee26 100644 (file)
@@ -4115,9 +4115,8 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line)
 #endif
                if ((abs(timestamp_pcrscr_get() - vf->pts) <= (vsync_pts_inc))
                          && ((int)(timestamp_pcrscr_get() - vf->pts) >= 0)) {
-                       /*vsync_pts_align =  vsync_pts_inc / 4 - */
-                       /*      (timestamp_pcrscr_get() - vf->pts);*/
-                       vsync_pts_align = 0;
+                       vsync_pts_align =  vsync_pts_inc / 4 -
+                               (timestamp_pcrscr_get() - vf->pts);
                        vsync_pts_aligned = true;
 #ifdef PTS_TRACE_DEBUG
                        pts_trace_his_rd = 0;
@@ -6695,7 +6694,8 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id)
                                        (cur_dispbuf) ?
                                        cur_dispbuf->duration : 0,
                                        vf->pts, timestamp_pcrscr_get(),
-                                       timestamp_pcrscr_get() - vf->pts,
+                                       timestamp_pcrscr_get() - vf->pts +
+                                       vsync_pts_align,
                                        pts_trace);
                        amlog_mask_if(toggle_cnt > 0, LOG_MASK_FRAMESKIP,
                                      "skipped\n");