Skip to content

Commit

Permalink
[Encode] fix HLK R2R PF issue
Browse files Browse the repository at this point in the history
fix HLK R2R issue by adding MI_BATCH_BUFFER_END if more than 6 frames buffer are requested by app.
  • Loading branch information
DaShi-Git authored and intel-mediadev committed Jun 6, 2024
1 parent 02d10ce commit aa60920
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,13 @@ namespace encode {
secondLevelBatchBufferUsed = &(m_batchBufferForVdencImgStat[m_pipeline->m_currRecycledBufIdx]);

// CQP case, driver programs the 2nd Level BB
ENCODE_CHK_STATUS_RETURN(Mhw_LockBb(m_osInterface, secondLevelBatchBufferUsed));
MOS_STATUS status = Mhw_LockBb(m_osInterface, secondLevelBatchBufferUsed);
if (status != MOS_STATUS_SUCCESS)
{
ENCODE_NORMALMESSAGE("ERROR - Recycled buffer index exceed the maximum");
SETPAR_AND_ADDCMD(MI_BATCH_BUFFER_END, m_miItf, &cmdBuffer);
return status;
}

SETPAR_AND_ADDCMD(MFX_AVC_IMG_STATE, m_mfxItf, nullptr, secondLevelBatchBufferUsed);
SETPAR_AND_ADDCMD(VDENC_CMD3, m_vdencItf, nullptr, secondLevelBatchBufferUsed);
Expand Down

0 comments on commit aa60920

Please sign in to comment.