media_module: CB1 vp9 and av1 pts adjustment incorrect. [1/1]
authorkuan.hu <kuan.hu@amlogic.com>
Fri, 10 Sep 2021 06:06:23 +0000 (14:06 +0800)
committerHongguang Chen <hgchen@google.com>
Sun, 12 Sep 2021 03:37:18 +0000 (03:37 +0000)
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 <kuan.hu@amlogic.com>
Change-Id: Ia5302afc6e309088e0576276545eadf5bd9f0d7e

drivers/frame_provider/decoder/vav1/vav1.c
drivers/frame_provider/decoder/vp9/vvp9.c

index 641cba87dd72a99760b3f44e81d8251156e8b0e7..e7ee9f5f8927d810b0f9da7f07c5857d41066887 100644 (file)
@@ -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])) {
index 02fa2e6e8b947d24fd93cd360072011e4f40d8cc..4ab61b4a283922bfd3cee7667031f8172ea8b703 100644 (file)
@@ -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])) {