Skip to content

Commit

Permalink
[VP] Force procamp to rende only lumaKey is enabled
Browse files Browse the repository at this point in the history
Refine logic to force procamp to rende only lumaKey is enabled
  • Loading branch information
kchen1024 authored and intel-mediadev committed Aug 5, 2023
1 parent 2fcdd52 commit bee1371
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
28 changes: 11 additions & 17 deletions media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2239,17 +2239,17 @@ MOS_STATUS Policy::InitExecuteCaps(VP_EXECUTE_CAPS &caps, VP_EngineEntry &engine
// For vebox/sfc+render case, use 2nd workload (render) to do csc for better performance
// in most VP common cases, e.g. NV12->RGB, to save the memory bandwidth.
caps.bForceCscToRender = true;
// not support procamp to render in fc if input is sRGB
// if both enable Lumaykey and procamp on the same layer, Lumaykey should be top-priority
if (engineCaps.veboxRGBOutputWithoutLumaKey)
// Force procamp to render if both enable Lumaykey and procamp on the same layer
// Lumaykey should be top-priority
if (engineCaps.outputWithLumaKey)
{
caps.bForceProcampToRender = false;
caps.bForceProcampToRender = true;
}
else
{
// For vebox/sfc+render case, use 2nd workload (render) to do Procamp,
// especially for the scenario including Lumakey feature, which will ensure the Procamp can be done after Lumakey.
caps.bForceProcampToRender = true;
caps.bForceProcampToRender = false;
}
// For vebox + render with features, which can be done on both sfc and render,
// and sfc is not must have, sfc should not be selected and those features should be done on render.
Expand Down Expand Up @@ -2509,22 +2509,16 @@ MOS_STATUS Policy::GetInputPipeEngineCaps(SwFilterPipe& featurePipe, VP_EngineEn
engineCapsForVeboxSfc.value |= engineCaps.value;
engineCapsForVeboxSfc.nonFcFeatureExists = true;
engineCapsForVeboxSfc.nonVeboxFeatureExists |= !engineCaps.VeboxNeeded;
if (engineCaps.bt2020ToRGB)

SwFilter *lumakey = featureSubPipe->GetSwFilter(FeatureTypeLumakey);
if (lumakey && lumakey->GetFilterEngineCaps().bEnabled)
{
bool isLumaKeyEnabled = false;
SwFilter *lumakey = featureSubPipe->GetSwFilter(FeatureTypeLumakey);
if (lumakey && lumakey->GetFilterEngineCaps().bEnabled)
{
isLumaKeyEnabled = true;
}
engineCapsForVeboxSfc.veboxRGBOutputWithoutLumaKey = !isLumaKeyEnabled;
engineCapsForVeboxSfc.outputWithLumaKey = true;
VP_PUBLIC_NORMALMESSAGE("outputWithLumaKey flag is set.");
}
else
{
if (!engineCapsForVeboxSfc.veboxRGBOutputWithoutLumaKey)
{
engineCapsForVeboxSfc.veboxRGBOutputWithoutLumaKey = false;
}
engineCapsForVeboxSfc.outputWithLumaKey = false;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ typedef struct _VP_EngineEntry
uint32_t isOutputPipeNeeded : 1; // true if the feature is used for parameter calculation.
uint32_t sfcOnlyFeatureExists : 1; // The feature exists, which only support sfc.
uint32_t bTemperalInputInuse : 1; // true if replace input
uint32_t veboxRGBOutputWithoutLumaKey : 1;
uint32_t outputWithLumaKey : 1;
};
uint32_t value;
};
Expand Down

0 comments on commit bee1371

Please sign in to comment.