Skip to content

Commit

Permalink
[Media Common] Disable some Vebox feature for WCL
Browse files Browse the repository at this point in the history
Disable some Vebox feature for WCL ,14018499149 - WCL - Client Mainstream/Essential/Entry (N+/N) Media Configuration (intel.com)
  • Loading branch information
huangli2018 authored and intel-mediadev committed Oct 30, 2023
1 parent e7ba5c8 commit c0c328e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
26 changes: 20 additions & 6 deletions media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ Policy::~Policy()
UnregisterFeatures();
}

MOS_STATUS Policy::UpdateVpHwCapsBasedOnSku(VP_HW_CAPS &vpHwCaps)
{
return MOS_STATUS_SUCCESS;
}

MOS_STATUS Policy::Initialize()
{
VP_FUNC_CALL();

VpPlatformInterface *vpPlatformInterface = (VpPlatformInterface *)m_vpInterface.GetHwInterface()->m_vpPlatformInterface;
VP_PUBLIC_CHK_NULL_RETURN(vpPlatformInterface);
VP_PUBLIC_CHK_STATUS_RETURN(vpPlatformInterface->InitVpHwCaps(m_hwCaps));
//update caps
UpdateVpHwCapsBasedOnSku(m_hwCaps);
VP_PUBLIC_CHK_STATUS_RETURN(RegisterFeatures());
m_initialized = true;
return MOS_STATUS_SUCCESS;
Expand Down Expand Up @@ -943,16 +950,15 @@ MOS_STATUS Policy::GetCSCExecutionCaps(SwFilter* feature)

auto userFeatureControl = m_vpInterface.GetHwInterface()->m_userFeatureControl;
bool disableVeboxOutput = userFeatureControl->IsVeboxOutputDisabled();
bool disableSfc = userFeatureControl->IsSfcDisabled();

bool disableSfc = userFeatureControl->IsSfcDisabled();
bool veboxTypeH = userFeatureControl->IsVeboxTypeHMode();
SwFilterCsc* csc = (SwFilterCsc*)feature;

FeatureParamCsc *cscParams = &csc->GetSwFilterParams();

MOS_FORMAT midFormat = Format_Any;

VP_EngineEntry *cscEngine = &csc->GetFilterEngineCaps();

// Clean usedForNextPass flag.
if (cscEngine->usedForNextPass)
{
Expand Down Expand Up @@ -1003,10 +1009,18 @@ MOS_STATUS Policy::GetCSCExecutionCaps(SwFilter* feature)
{
VP_PUBLIC_NORMALMESSAGE("BeCsc is needed by Alpha when output from vebox. Keep csc filter.");
cscEngine->bEnabled = 1;
cscEngine->SfcNeeded = disableSfc ? 0 : 1;
cscEngine->VeboxNeeded = 1;
cscEngine->SfcNeeded = disableSfc ? 0 : 1;
cscEngine->RenderNeeded = 1;
cscEngine->fcSupported = 1;
cscEngine->fcSupported = 1;
if (veboxTypeH)
{
cscEngine->VeboxNeeded = 0;
VP_PUBLIC_NORMALMESSAGE("Not use vebox to do csc for veboxTypeH.");
}
else
{
cscEngine->VeboxNeeded = 1;
}
}
else
{
Expand Down
2 changes: 2 additions & 0 deletions media_softlet/agnostic/common/vp/hal/feature_manager/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Policy
{
return m_featurePool;
}

virtual MOS_STATUS UpdateVpHwCapsBasedOnSku(VP_HW_CAPS &vpHwCaps);

protected:
virtual MOS_STATUS RegisterFeatures();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ VpUserFeatureControl::VpUserFeatureControl(MOS_INTERFACE &osInterface, VpPlatfor
m_ctrlValDefault.splitFramePortions = splitFramePortions;
}

//check vebox type
if (skuTable && (MEDIA_IS_SKU(skuTable, FtrVeboxTypeH)))
{
m_ctrlValDefault.veboxTypeH = true;
}
VP_PUBLIC_NORMALMESSAGE("veboxTypeH %d", m_ctrlValDefault.veboxTypeH);

m_ctrlVal = m_ctrlValDefault;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class VpUserFeatureControl
bool disableDn = false;
bool cscCosffPatchModeDisabled = false;
bool ForceEnableVeboxOutputSurf = false;
bool veboxTypeH = false;

#if (_DEBUG || _RELEASE_INTERNAL)
bool forceDecompressedOutput = false;
Expand Down Expand Up @@ -165,6 +166,11 @@ class VpUserFeatureControl
return m_ctrlVal.decompForInterlacedSurfWaEnabled;
}

bool IsVeboxTypeHMode()
{
return m_ctrlVal.veboxTypeH;
}

MOS_STATUS SetClearVideoViewMode(bool mode)
{
m_ctrlVal.clearVideoViewMode = mode;
Expand Down

0 comments on commit c0c328e

Please sign in to comment.