From 91bcf47b03a1cec8180aed92fdbd1a58812f6d65 Mon Sep 17 00:00:00 2001 From: "kuan.hu" Date: Fri, 10 Sep 2021 14:06:23 +0800 Subject: [PATCH] media_module: CB1 vp9 and av1 pts adjustment incorrect. [1/1] PD#SWPL-59072 Problem: The logic of adjusting pts is wrong. Solution: Modify the logic of adjusting pts. Verify: ADT3 Signed-off-by: kuan.hu Change-Id: Ia5302afc6e309088e0576276545eadf5bd9f0d7e --- drivers/frame_provider/decoder/vav1/vav1.c | 4 ++-- drivers/frame_provider/decoder/vp9/vvp9.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/frame_provider/decoder/vav1/vav1.c b/drivers/frame_provider/decoder/vav1/vav1.c index 641cba8..e7ee9f5 100644 --- a/drivers/frame_provider/decoder/vav1/vav1.c +++ b/drivers/frame_provider/decoder/vav1/vav1.c @@ -6412,8 +6412,8 @@ static int prepare_display_buf(struct AV1HW_s *hw, } } } else { - if ((pic_config->pts == 0) || (pic_config->pts <= hw->last_pts) && - (pic_config->pts64 <= hw->last_pts_us64)) { + if ((pic_config->pts == 0) || ((pic_config->pts <= hw->last_pts) && + (pic_config->pts64 <= hw->last_pts_us64))) { for (i = (FRAME_BUFFERS - 1); i > 0; i--) { if ((hw->last_pts == hw->frame_mode_pts_save[i]) || (hw->last_pts_us64 == hw->frame_mode_pts64_save[i])) { diff --git a/drivers/frame_provider/decoder/vp9/vvp9.c b/drivers/frame_provider/decoder/vp9/vvp9.c index 02fa2e6..4ab61b4 100644 --- a/drivers/frame_provider/decoder/vp9/vvp9.c +++ b/drivers/frame_provider/decoder/vp9/vvp9.c @@ -7374,8 +7374,8 @@ static int prepare_display_buf(struct VP9Decoder_s *pbi, display_frame_count[pbi->index]++; if (vf) { if (!force_pts_unstable) { - if ((pic_config->pts == 0) || (pic_config->pts <= pbi->last_pts) && - (pic_config->pts64 <= pbi->last_pts_us64)) { + if ((pic_config->pts == 0) || ((pic_config->pts <= pbi->last_pts) && + (pic_config->pts64 <= pbi->last_pts_us64))) { for (i = (FRAME_BUFFERS - 1); i > 0; i--) { if ((pbi->last_pts == pbi->frame_mode_pts_save[i]) || (pbi->last_pts_us64 == pbi->frame_mode_pts64_save[i])) { -- 2.20.1