From 4999e83c0d8bed99f86c0709f849fcddce23d630 Mon Sep 17 00:00:00 2001 From: rongrong zhou Date: Wed, 25 Dec 2019 17:51:02 +0800 Subject: [PATCH] di: copy vframe pts_us64 to start_pts64 [1/1] PD#SWPL-18928 Problem: DI first frame pts_us64 cause video discontinue Solution: copy pts_us64 Verify: local Change-Id: I86adf0e6221083a4205a07f7920a6d443b447c15 Signed-off-by: rongrong zhou --- drivers/amlogic/media/di_multi/deinterlace.c | 8 ++++++-- drivers/amlogic/media/di_multi/deinterlace.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/di_multi/deinterlace.c b/drivers/amlogic/media/di_multi/deinterlace.c index 6bac4fb09f9f..97be2c34c201 100644 --- a/drivers/amlogic/media/di_multi/deinterlace.c +++ b/drivers/amlogic/media/di_multi/deinterlace.c @@ -5866,8 +5866,10 @@ static void drop_frame(int check_drop, int throw_flag, struct di_buf_s *di_buf, struct di_post_stru_s *ppost = get_post_stru(channel); di_lock_irqfiq_save(irq_flag2); - if ((frame_count == 0) && check_drop) + if ((frame_count == 0) && check_drop) { ppost->start_pts = di_buf->vframe->pts; + ppost->start_pts64 = di_buf->vframe->pts_us64; + } if ((check_drop && (frame_count < dimp_get(eDI_MP_start_frame_drop_count))) || throw_flag) { @@ -5876,8 +5878,10 @@ static void drop_frame(int check_drop, int throw_flag, struct di_buf_s *di_buf, if (check_drop && (frame_count == dimp_get(eDI_MP_start_frame_drop_count))) { if ((ppost->start_pts) && - (di_buf->vframe->pts == 0)) + (di_buf->vframe->pts == 0)) { di_buf->vframe->pts = ppost->start_pts; + di_buf->vframe->pts_us64 = ppost->start_pts64; + } ppost->start_pts = 0; } for (i = 0; i < 3; i++) { diff --git a/drivers/amlogic/media/di_multi/deinterlace.h b/drivers/amlogic/media/di_multi/deinterlace.h index 2c01afa198bf..30529dad77c2 100644 --- a/drivers/amlogic/media/di_multi/deinterlace.h +++ b/drivers/amlogic/media/di_multi/deinterlace.h @@ -427,6 +427,7 @@ struct di_post_stru_s { bool toggle_flag; bool vscale_skip_flag; uint start_pts; + u64 start_pts64; int buf_type; int de_post_process_done; int post_de_busy; -- 2.20.1