Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.

Commit d7779bd

Browse files
weizhu-intelOleg Nabiullin
authored and
Oleg Nabiullin
committed
[av1d]: increase decode picture buffer
For current AV1's DPB implementation, after decoding a frame, Output frame will be saved in a temporary variable for DPB update when next frame coming. Need to give one more buffer to save temporary frame for DPB update. For this stream, it has 8 reference frames in DPB, if we only allocate 8 + 1 + async_depth buffers, DPB is not update immediately so no output, in app side, it can't get any more free buffer to feed next frame, then deadlock. Issue: MDP-63996 Tests: ./sample_decode -hw av1 -i ./test_stream_av1.ivf -o 0001.yuv -async 1 -vaapi Change-Id: I10ab4b697cd392b76068e4e83935688fa1279ee8
1 parent 3216ddc commit d7779bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_studio/mfx_lib/shared/src/mfx_vpx_dec_common.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ namespace MFX_VPX_Utility
472472
// Increase minimum number by one
473473
// E.g., decoder unlocks references in sync part (NOT async), so in order to free some surface
474474
// application need an additional surface to call DecodeFrameAsync()
475-
p_request->NumFrameMin += 1;
475+
p_request->NumFrameMin += 2;
476476

477477
p_request->NumFrameSuggested = p_request->NumFrameMin;
478478

_studio/shared/umc/codec/av1_dec/src/umc_av1_decoder_va.cpp

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace UMC_AV1_DECODER
5757
packer.reset(Packer::CreatePacker(va));
5858

5959
uint32_t const dpb_size =
60-
params.async_depth + TOTAL_REFS;
60+
params.async_depth + TOTAL_REFS + 2;
6161
SetDPBSize(dpb_size);
6262
SetRefSize(TOTAL_REFS);
6363
return UMC::UMC_OK;

0 commit comments

Comments
 (0)