Skip to content

Commit

Permalink
[Encode] Fix downscaledFieldHeightInMB4x align issue
Browse files Browse the repository at this point in the history
Fix downscaledFieldHeightInMB4x align issue
  • Loading branch information
huangli2018 authored and intel-mediadev committed Oct 22, 2024
1 parent 105a308 commit 692d0b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7613,7 +7613,7 @@ MOS_STATUS CodechalEncodeAvcEnc::AllocateResourcesBrc()
if (bBrcDistortionBufferSupported)
{
// BRC Distortion Surface
downscaledFieldHeightInMB4x = CODECHAL_GET_HEIGHT_IN_MACROBLOCKS((m_frameHeight + 1) >> 3);
downscaledFieldHeightInMB4x = CODECHAL_GET_HEIGHT_IN_MACROBLOCKS((m_frameHeight + 7) >> 3);
width = MOS_ALIGN_CEIL((m_downscaledWidthInMb4x << 3), 64);
height = MOS_ALIGN_CEIL((downscaledFieldHeightInMB4x << 2), 8) << 1;

Expand Down Expand Up @@ -7778,7 +7778,7 @@ MOS_STATUS CodechalEncodeAvcEnc::AllocateResourcesMbBrc()
MOS_ZeroMemory(&lockFlagsWriteOnly, sizeof(MOS_LOCK_PARAMS));
lockFlagsWriteOnly.WriteOnly = 1;

uint32_t downscaledFieldHeightInMB4x = CODECHAL_GET_HEIGHT_IN_MACROBLOCKS((m_frameHeight + 1) >> 3);
uint32_t downscaledFieldHeightInMB4x = CODECHAL_GET_HEIGHT_IN_MACROBLOCKS((m_frameHeight + 7) >> 3);

// Mb QP Surface
if (Mos_ResourceIsNull(&BrcBuffers.sBrcMbQpBuffer.OsResource))
Expand Down

0 comments on commit 692d0b0

Please sign in to comment.