Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HEVC 10bit encoding on KBL. (GitHub issue #320) #333

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,8 @@ bool CodechalEncHevcState::CheckSupportedFormat(PMOS_SURFACE surface)
case Format_NV12:
isColorFormatSupported = IS_Y_MAJOR_TILE_FORMAT(surface->TileType);
break;
case Format_P010:
isColorFormatSupported = true;
case Format_YUY2:
case Format_YUYV:
case Format_A8R8G8B8:
Expand Down
12 changes: 3 additions & 9 deletions media_driver/agnostic/gen9/codec/hal/codechal_encode_hevc_g9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4840,7 +4840,7 @@ MOS_STATUS CodechalEncHevcStateG9::InitKernelStateMbEnc()

if(MEDIA_IS_SKU(m_hwInterface->GetSkuTable(), FtrEncodeHEVC10bit) && m_is10BitHevc)
{
m_numMbEncEncKrnStates = CODECHAL_HEVC_MBENC_NUM_KBL;
m_numMbEncEncKrnStates = CODECHAL_HEVC_MBENC_NUM_BXT_SKL;
}
else if (!m_noMeKernelForPFrame)
{
Expand All @@ -4865,14 +4865,7 @@ MOS_STATUS CodechalEncHevcStateG9::InitKernelStateMbEnc()
auto kernelSize = m_combinedKernelSize;
CODECHAL_KERNEL_HEADER currKrnHeader;

if (krnStateIdx == CODECHAL_HEVC_MBENC_DS_COMBINED &&
m_numMbEncEncKrnStates == CODECHAL_HEVC_MBENC_NUM_BXT_SKL) //Ignore. It isn't used on BXT.
{
kernelStatePtr++;
continue;
}

CODECHAL_ENCODE_CHK_STATUS_RETURN(pfnGetKernelHeaderAndSize(
CODECHAL_ENCODE_CHK_STATUS(pfnGetKernelHeaderAndSize(
m_kernelBinary,
ENC_MBENC,
krnStateIdx,
Expand All @@ -4898,6 +4891,7 @@ MOS_STATUS CodechalEncHevcStateG9::InitKernelStateMbEnc()

CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->MhwInitISH(m_stateHeapInterface, kernelStatePtr));

finish:
kernelStatePtr++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ MOS_STATUS CodechalEncHevcStateG9Skl::GetKernelHeaderAndSize(
currKrnHeader = &kernelHeaderTable->Hevc_LCUEnc_PB_Adv;
break;

case CODECHAL_HEVC_MBENC_DS_COMBINED:
currKrnHeader = &kernelHeaderTable->Hevc_LCUEnc_DS_Combined;
break;

case CODECHAL_HEVC_MBENC_PENC:
currKrnHeader = &kernelHeaderTable->HEVC_LCUEnc_P_MB;
break;
Expand Down