video: modify the statistics of new frame count [1/1]
authorRui Wang <rui.wang@amlogic.com>
Wed, 21 Aug 2019 11:34:05 +0000 (19:34 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Tue, 27 Aug 2019 10:26:49 +0000 (03:26 -0700)
PD#TV-8725

Problem:
STR standby, wake up, takes a long time, takes 5-6s.

Solution:
When the first frame is displayed,
the statistics start new frame count.

Verify:
Verified with X301

Change-Id: Ib318455959fe9688f3c697b1d562388547002877
Signed-off-by: Rui Wang <rui.wang@amlogic.com>
drivers/amlogic/media/video_sink/video.c

index 31cba09..b53770f 100644 (file)
@@ -3926,11 +3926,15 @@ static void vsync_toggle_frame(struct vframe_s *vf, int line)
                }
        }
 
-       if ((cur_dispbuf) && (cur_dispbuf != &vf_local) && (cur_dispbuf != vf)
-           && (video_property_changed != 2)) {
+       if (cur_dispbuf != vf) {
                new_frame_count++;
                if (new_frame_count == 1)
                        first_picture = 1;
+       }
+
+       if ((cur_dispbuf) && (cur_dispbuf != &vf_local) && (cur_dispbuf != vf)
+           && (video_property_changed != 2)) {
+
 #ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
                if (is_vsync_rdma_enable()) {
 #ifdef RDMA_RECYCLE_ORDERED_VFRAMES