Skip to content

Commit

Permalink
[Encode] Add OnSizeChange for AVC resolution change
Browse files Browse the repository at this point in the history
Add tracked buffer OnSizeChange for resolution change issue fix
  • Loading branch information
tim-xie-in authored and intel-mediadev committed Jan 3, 2024
1 parent f5f09c4 commit a98e005
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,11 @@ bool AvcBasicFeature::InputSurfaceNeedsExtraCopy(const MOS_SURFACE &input)

MOS_STATUS AvcBasicFeature::UpdateTrackedBufferParameters()
{
ENCODE_FUNC_CALL();
ENCODE_CHK_NULL_RETURN(m_trackedBuf);

ENCODE_CHK_STATUS_RETURN(m_trackedBuf->OnSizeChange());

uint32_t fieldNumMBs = (uint32_t)m_picWidthInMb * ((m_picHeightInMb + 1) >> 1);

m_mbCodeSize = MOS_ALIGN_CEIL(fieldNumMBs * 16 * 4, CODECHAL_PAGE_SIZE) + fieldNumMBs * 16 * 4;
Expand Down

0 comments on commit a98e005

Please sign in to comment.