vh265: disable auto switch to duration mode [1/1]
authorHui Zhang <hui.zhang@amlogic.com>
Tue, 18 Aug 2020 05:25:49 +0000 (13:25 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Mon, 24 Aug 2020 00:18:59 +0000 (17:18 -0700)
PD#SWPL-30099

Problem:
this auto switch is not work well. beccause in some error
case. it will output wrong pts , cause display block

Solution:
remove this auto switch for pts duration mode

Verify:
U215

Change-Id: I80c428e7869318ba6507c86ba104d8fe5a997690
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c

index 33164ec89ea1aa3776f9680669d9a0ed39f6a761..6d47ee0ce70bf634d1f277a67b1df2bb3cf80b4e 100644 (file)
@@ -8896,33 +8896,6 @@ static int prepare_display_buf(struct hevc_state_s *hevc, struct PIC_s *pic)
 
                fill_frame_info(hevc, pic, frame_size, vf->pts);
 
-               if ((hevc->pts_mode == PTS_NORMAL) && (vf->pts != 0)
-                       && hevc->get_frame_dur) {
-                       int pts_diff = (int)vf->pts - hevc->last_lookup_pts;
-
-                       if (pts_diff < 0) {
-                               hevc->pts_mode_switching_count++;
-                               hevc->pts_mode_recovery_count = 0;
-
-                               if (hevc->pts_mode_switching_count >=
-                                       PTS_MODE_SWITCHING_THRESHOLD) {
-                                       hevc->pts_mode =
-                                               PTS_NONE_REF_USE_DURATION;
-                                       hevc_print(hevc, 0,
-                                       "HEVC: switch to n_d mode.\n");
-                               }
-
-                       } else {
-                               int p = PTS_MODE_SWITCHING_RECOVERY_THREASHOLD;
-
-                               hevc->pts_mode_recovery_count++;
-                               if (hevc->pts_mode_recovery_count > p) {
-                                       hevc->pts_mode_switching_count = 0;
-                                       hevc->pts_mode_recovery_count = 0;
-                               }
-                       }
-               }
-
                if (vf->pts != 0)
                        hevc->last_lookup_pts = vf->pts;