Skip to content

Commit

Permalink
Revert "[Decode] Complete cur frame in child thread to unlock res (#6…
Browse files Browse the repository at this point in the history
…509)"

This reverts commit c40736a.
This patch make the decoded VP9 CBR frame in unexpected order.

Tracked-On: OAM-118913
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
  • Loading branch information
Shao-Feng committed Jun 28, 2024
1 parent eeadd67 commit 88ee1b5
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions _studio/mfx_lib/decode/vp9/src/mfx_vp9_dec_decode_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,18 +276,6 @@ class FrameStorage
}
}

void CompleteCurFrame(UMC::FrameMemID frameId)
{
auto find_it = std::find_if(m_submittedFrames.begin(), m_submittedFrames.end(),
[frameId](const UMC_VP9_DECODER::VP9DecoderFrame & item) { return item.currFrame == frameId; });

if (find_it != m_submittedFrames.end() && find_it->isDecoded)
{
UnLockResources(*find_it);
m_submittedFrames.erase(find_it);
}
}

void CompleteFrames()
{
for (auto it = m_submittedFrames.begin(); it != m_submittedFrames.end(); )
Expand Down Expand Up @@ -935,7 +923,6 @@ mfxStatus MFX_CDECL VP9DECODERoutine(void *p_state, void * /* pp_param */, mfxU3
decoder.m_surface_source->SetFreeSurfaceAllowedFlag(false);
}
decoder.m_framesStorage->DecodeFrame(data.currFrameId);
decoder.m_framesStorage->CompleteCurFrame(data.currFrameId);

return MFX_ERR_NONE;
}
Expand Down Expand Up @@ -973,7 +960,6 @@ mfxStatus MFX_CDECL VP9DECODERoutine(void *p_state, void * /* pp_param */, mfxU3
if (data.currFrameId != -1)
decoder.m_surface_source->DecreaseReference(data.currFrameId);
decoder.m_framesStorage->DecodeFrame(data.currFrameId);
decoder.m_framesStorage->CompleteCurFrame(data.currFrameId);

return MFX_TASK_DONE;
}
Expand Down

0 comments on commit 88ee1b5

Please sign in to comment.