Skip to content

Commit

Permalink
[Decode] Refine DPB management (#6543)
Browse files Browse the repository at this point in the history
Co-authored-by: chuanli1 <[email protected]>
(cherry picked from commit 5aa1010)

This commit is reuqired to avoid AV1 decode with vpl_sample_decode
random fail issue.

Tracked-On: OAM-129466
Signed-off-by: Lina Sun <[email protected]>
  • Loading branch information
gfxVPLsdm authored and lsun30 committed Jan 15, 2025
1 parent a5c55c1 commit 5de571f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Packer
virtual ~Packer();

virtual UMC::Status GetStatusReport(void* pStatusReport, size_t size) = 0;
virtual UMC::Status SyncTask(AV1DecoderFrame * frame, void * error) = 0;
virtual UMC::Status SyncTask(int32_t index, void * error) = 0;

virtual void BeginFrame() = 0;
virtual void EndFrame() = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ namespace UMC_AV1_DECODER
PackerVA(UMC::VideoAccelerator * va);

UMC::Status GetStatusReport(void * pStatusReport, size_t size) override;
UMC::Status SyncTask(AV1DecoderFrame * frame, void * error) override
UMC::Status SyncTask(int32_t index, void * error) override
{
frame->IncrementReference();
auto sts = m_va->SyncTask(frame->GetMemID(), error);
frame->DecrementReference();
return sts;
return m_va->SyncTask(index, error);
}
void BeginFrame() override;
void EndFrame() override;
Expand Down
5 changes: 3 additions & 2 deletions _studio/shared/umc/codec/av1_dec/src/umc_av1_decoder_va.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ namespace UMC_AV1_DECODER
{
auto_guard.unlock();
{
sts = packer->SyncTask(&frame, NULL);
sts = packer->SyncTask(frame.GetMemID(), NULL);
}
auto_guard.lock();
}
VAStatus surfErr = VA_STATUS_SUCCESS;
index = frame.GetMemID();
auto_guard.unlock();
UMC::Status sts = packer->SyncTask(&frame, &surfErr);
UMC::Status sts = packer->SyncTask(index, &surfErr);
auto_guard.lock();

frame.CompleteDecoding();
Expand Down

0 comments on commit 5de571f

Please sign in to comment.