From eb8f6e9617a99af771fe2e87df1ae32db410ad34 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 27 Apr 2024 19:21:40 +0200 Subject: [PATCH] Revert "radeonsi/vcn: AV1 skip the redundant bs resize" Currently ffmpeg has a bug in VAAPI AV1 decode that in some cases it submits the same slice data buffer as many times as there is tiles. However, in other cases it behaves correctly and all slice data buffers contain different parts of bitstream to decode which this change breaks. Now that the va frontend is passing correct offsets, this fixes decoding AV1-TEST-VECTORS/av1-1-b8-22-svc-L1T2 with ffmpeg. This reverts commit e6701f723147c45798584ba77da7095f2317684c. Cc: mesa-stable Reviewed-by: Leo Liu Part-of: (cherry picked from commit 88dfe04b08d5a1279dbde042b2e79ca2e7a530a6) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/radeon_vcn_dec.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e5ee00dca34..09093aacbf4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -414,7 +414,7 @@ "description": "Revert \"radeonsi/vcn: AV1 skip the redundant bs resize\"", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/radeonsi/radeon_vcn_dec.c b/src/gallium/drivers/radeonsi/radeon_vcn_dec.c index 6d19d84c47f..ad12990fa60 100644 --- a/src/gallium/drivers/radeonsi/radeon_vcn_dec.c +++ b/src/gallium/drivers/radeonsi/radeon_vcn_dec.c @@ -2873,9 +2873,6 @@ static void radeon_dec_decode_bitstream(struct pipe_video_codec *decoder, if (!dec->bs_ptr) return; - if (dec->bs_size && dec->stream_type == RDECODE_CODEC_AV1) - return; - unsigned long total_bs_size = dec->bs_size; for (i = 0; i < num_buffers; ++i) total_bs_size += sizes[i];