author | shihong.zheng <shihong.zheng@amlogic.com> | 2020-08-10 04:16:52 (GMT) |
---|---|---|
committer | Hui Zhang <hui.zhang@amlogic.com> | 2020-08-12 02:12:00 (GMT) |
commit | a03797844ab7e33388ea40870abefc232d40ea6c (patch) | |
tree | 850c9275939482ed878e9c42431c367dd0c51d30 | |
parent | d3b4fbc54fd009f89066370680271b32404ad6d2 (diff) | |
download | media_modules-a03797844ab7e33388ea40870abefc232d40ea6c.zip media_modules-a03797844ab7e33388ea40870abefc232d40ea6c.tar.gz media_modules-a03797844ab7e33388ea40870abefc232d40ea6c.tar.bz2 |
av1: fix av1 av sync nts problem. [1/1]
PD#SWPL-31133
Problem:
nts av sync test failed. av1 decoder
drop first pts which value is 0.
Solution:
change the pts save condition. fix
first pts drop bug.
Verify:
ah212
Change-Id: I7eeafd38ab8215d55f0d5efe7de0a027f42ea1a2
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/vav1/vav1.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/frame_provider/decoder/vav1/vav1.c b/drivers/frame_provider/decoder/vav1/vav1.c index cd2e598..4a8e2eb 100644 --- a/drivers/frame_provider/decoder/vav1/vav1.c +++ b/drivers/frame_provider/decoder/vav1/vav1.c @@ -9603,10 +9603,15 @@ static void av1_frame_mode_pts_save(struct AV1HW_s *hw) u64 i, valid_pts_diff_cnt, pts_diff_sum; u64 in_pts_diff, last_valid_pts_diff, calc_dur; - if ((hw->chunk == NULL) || - (hw->frame_count && (hw->chunk->pts == 0)) || - (hw->frame_mode_pts_save[0] == hw->chunk->pts)) + if (hw->chunk == NULL) return; + /* no return when first pts is 0 */ + if (hw->first_pts_index) { + /* filtration pts 0 and continuous same pts */ + if ((hw->chunk->pts == 0) || + (hw->frame_mode_pts_save[0] == hw->chunk->pts)) + return; + } av1_print(hw, AV1_DEBUG_OUT_PTS, "run_front: pts %d, pts64 %lld, ts: %llu\n", hw->chunk->pts, hw->chunk->pts64, hw->chunk->timestamp); |