Skip to content

Commit

Permalink
[VP] Enable OCL FC IMC3
Browse files Browse the repository at this point in the history
enable imc3 for ocl fc
  • Loading branch information
peiyigu-intel authored and intel-mediadev committed Nov 14, 2024
1 parent 0a024b4 commit 22fc095
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions media_softlet/agnostic/common/renderhal/renderhal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4286,6 +4286,7 @@ MOS_STATUS RenderHal_GetPlaneDefinitionForCommonMessage(
case Format_P210:
case Format_P216:
case Format_I420:
case Format_IMC3:
case Format_IYUV:
case Format_R5G6B5:
case Format_R8G8B8:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ MOS_STATUS VpResourceManager::AssignFcResources(VP_EXECUTE_CAPS &caps, std::vect
case Format_I420:
case Format_YV12:
case Format_IYUV:
case Format_IMC3:
fcIntermediaInputFormat = Format_NV12;
break;
case Format_422H:
Expand Down Expand Up @@ -1201,6 +1202,7 @@ MOS_STATUS VpResourceManager::AssignFcResources(VP_EXECUTE_CAPS &caps, std::vect
fcIntermediaSurfaceOutputFormat = Format_AYUV;
break;
case Format_I420:
case Format_IMC3:
case Format_YV12:
case Format_IYUV:
fcIntermediaSurfaceOutputFormat = Format_NV12;
Expand Down
12 changes: 10 additions & 2 deletions media_softlet/agnostic/common/vp/hal/features/vp_ocl_fc_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ MOS_STATUS VpOclFcFilter::InitKrnParams(OCL_FC_KERNEL_PARAMS &krnParams, SwFilte
case Format_I420:
case Format_IYUV:
case Format_YV12:
case Format_IMC3:
VP_RENDER_CHK_STATUS_RETURN(GenerateFc420PL3InputParam(compParam.inputLayersParam[i], i, param));
krnParams.push_back(param);
break;
Expand Down Expand Up @@ -253,6 +254,7 @@ MOS_STATUS VpOclFcFilter::InitKrnParams(OCL_FC_KERNEL_PARAMS &krnParams, SwFilte
switch (compParam.outputLayerParam.surf->osSurface->Format)
{
case Format_I420:
case Format_IMC3:
case Format_YV12:
case Format_IYUV:
VP_RENDER_CHK_STATUS_RETURN(GenerateFc420PL3OutputParam(compParam.outputLayerParam, param));
Expand Down Expand Up @@ -1565,6 +1567,7 @@ MOS_STATUS VpOclFcFilter::InitLayer(SwFilterPipe &executingPipe, bool isInputPip
layer.intermediaFormat = Format_AYUV;
break;
case Format_I420:
case Format_IMC3:
case Format_IYUV:
case Format_YV12:
layer.needIntermediaSurface = true;
Expand Down Expand Up @@ -1721,6 +1724,7 @@ MOS_STATUS VpOclFcFilter::GetChromaSitingFactor(MOS_FORMAT format, uint8_t &hitS
hitSecPlaneFactorY = 1;
break;
case Format_I420:
case Format_IMC3:
case Format_IYUV:
case Format_YV12:
hitSecPlaneFactorX = 2;
Expand Down Expand Up @@ -2229,6 +2233,7 @@ MOS_STATUS VpOclFcFilter::ConvertInputOutputSingleChannelIndexToKrnParam(MOS_FOR
{
case Format_YV12:
case Format_I420:
case Format_IMC3:
case Format_IYUV:
case Format_422H:
case Format_422V:
Expand Down Expand Up @@ -2338,6 +2343,7 @@ MOS_STATUS VpOclFcFilter::ConvertInputChannelIndicesToKrnParam(MOS_FORMAT format
break;
case Format_YV12:
case Format_I420:
case Format_IMC3:
case Format_IYUV:
inputChannelIndices[0] = 0;
inputChannelIndices[1] = 4;
Expand Down Expand Up @@ -2587,6 +2593,7 @@ MOS_STATUS VpOclFcFilter::ConvertOutputChannelIndicesToKrnParam(MOS_FORMAT forma
break;
case Format_YV12:
case Format_I420:
case Format_IMC3:
case Format_IYUV:
dynamicChannelIndices[0] = 0;
dynamicChannelIndices[1] = 1;
Expand Down Expand Up @@ -3443,8 +3450,9 @@ void VpOclFcFilter::ReportDiffLog(const OCL_FC_COMP_PARAM &compParam, bool isFas
}

if ((format == Format_YV12 ||
format == Format_IYUV ||
format == Format_I420) &&
format == Format_IYUV ||
format == Format_I420 ||
format == Format_IMC3) &&
targetSurf->ChromaSiting != (CHROMA_SITING_HORZ_LEFT | CHROMA_SITING_VERT_TOP))
{
//legacy didn't support 3 plane chromasiting CDS. So legacy FC will only do left top for PL3 output
Expand Down

0 comments on commit 22fc095

Please sign in to comment.