Skip to content

Commit

Permalink
[VP] remove the reusable condition for no need check this for team pa…
Browse files Browse the repository at this point in the history
…cket reuse

remove the reusable condition for no need check this for team packet reuse.
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Nov 12, 2024
1 parent 87b65f4 commit dbfb86c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ MOS_STATUS VpFeatureReuseBase::UpdatePacket(SwFilter *filter, VpCmdPacket *packe
return MOS_STATUS_INVALID_PARAMETER;
}

MOS_STATUS VpFeatureReuseBase::CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index)
MOS_STATUS VpFeatureReuseBase::CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index)
{
reused = false;
return MOS_STATUS_SUCCESS;
Expand Down Expand Up @@ -119,7 +119,7 @@ MOS_STATUS VpScalingReuse::UpdateFeatureParams(FeatureParamScaling &params)
return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpScalingReuse::CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index)
MOS_STATUS VpScalingReuse::CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index)
{
VP_FUNC_CALL();
SwFilterScaling *scaling = dynamic_cast<SwFilterScaling *>(filter);
Expand All @@ -128,7 +128,7 @@ MOS_STATUS VpScalingReuse::CheckTeamsParams(bool reusable, bool &reused, SwFilte
auto it = m_params_Teams.find(index);
VP_PUBLIC_CHK_NOT_FOUND_RETURN(it, &m_params_Teams);

if (reusable && params == it->second)
if (params == it->second)
{
// No need call UpdateFeatureParams. Just keep compared items updated in m_params
// is enough. UpdatePacket should use params in swfilter instead of m_params.
Expand Down Expand Up @@ -245,7 +245,7 @@ MOS_STATUS VpCscReuse::UpdateFeatureParams(FeatureParamCsc &params)
return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpCscReuse::CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index)
MOS_STATUS VpCscReuse::CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index)
{
VP_FUNC_CALL();
auto IsIefEnabled = [&](PVPHAL_IEF_PARAMS iefParams) {
Expand All @@ -259,8 +259,7 @@ MOS_STATUS VpCscReuse::CheckTeamsParams(bool reusable, bool &reused, SwFilter *f
VP_PUBLIC_CHK_NOT_FOUND_RETURN(it, &m_params_Teams);

// pIEFParams to be updated.
if (reusable &&
params.formatInput == it->second.formatInput &&
if (params.formatInput == it->second.formatInput &&
params.formatOutput == it->second.formatOutput &&
params.input == it->second.input &&
params.output == it->second.output &&
Expand Down Expand Up @@ -341,7 +340,7 @@ MOS_STATUS VpRotMirReuse::UpdateFeatureParams(FeatureParamRotMir &params)
return MOS_STATUS_SUCCESS;
}

MOS_STATUS VpRotMirReuse::CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index)
MOS_STATUS VpRotMirReuse::CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index)
{
VP_FUNC_CALL();

Expand All @@ -353,8 +352,7 @@ MOS_STATUS VpRotMirReuse::CheckTeamsParams(bool reusable, bool &reused, SwFilter
VP_PUBLIC_CHK_NOT_FOUND_RETURN(it, &m_params_Teams);

// pIEFParams to be updated.
if (reusable &&
params == it->second)
if (params == it->second)
{
reused = true;
}
Expand Down Expand Up @@ -921,19 +919,19 @@ MOS_STATUS VpPacketReuseManager::PreparePacketPipeReuse(SwFilterPipe *&swFilterP

for (index = 0; index < m_pipeReused_TeamsPacket.size(); index++)
{
scalingreuse->second->CheckTeamsParams(reusableOfLastPipe, reused, scaling, index);
scalingreuse->second->CheckTeamsParams(reused, scaling, index);
if (!reused)
{
continue;
}

cscreuse->second->CheckTeamsParams(reusableOfLastPipe, reused, csc, index);
cscreuse->second->CheckTeamsParams(reused, csc, index);
if (!reused)
{
continue;
}

rotreuse->second->CheckTeamsParams(reusableOfLastPipe, reused, rot, index);
rotreuse->second->CheckTeamsParams(reused, rot, index);
if (reused)
{
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class VpFeatureReuseBase
virtual ~VpFeatureReuseBase();
virtual MOS_STATUS UpdateFeatureParams(bool reusable, bool &reused, SwFilter *filter);
virtual MOS_STATUS UpdatePacket(SwFilter *filter, VpCmdPacket *packet);
virtual MOS_STATUS CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index);
virtual MOS_STATUS CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index);
virtual MOS_STATUS StoreTeamsParams(SwFilter *filter, uint32_t index);

MOS_STATUS HandleNullSwFilter(bool reusableOfLastPipe, bool &isPacketPipeReused, SwFilter *filter, bool &ignoreUpdateFeatureParams)
Expand Down Expand Up @@ -91,7 +91,7 @@ class VpScalingReuse : public VpFeatureReuseBase

MOS_STATUS UpdatePacket(SwFilter *filter, VpCmdPacket *packet);

MOS_STATUS CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index);
MOS_STATUS CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index);

MOS_STATUS StoreTeamsParams(SwFilter *filter, uint32_t index);

Expand All @@ -116,7 +116,7 @@ class VpCscReuse : public VpFeatureReuseBase

MOS_STATUS UpdatePacket(SwFilter *filter, VpCmdPacket *packet);

MOS_STATUS CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index);
MOS_STATUS CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index);

MOS_STATUS StoreTeamsParams(SwFilter *filter, uint32_t index);

Expand All @@ -140,7 +140,7 @@ class VpRotMirReuse : public VpFeatureReuseBase

MOS_STATUS UpdatePacket(SwFilter *filter, VpCmdPacket *packet);

MOS_STATUS CheckTeamsParams(bool reusable, bool &reused, SwFilter *filter, uint32_t index);
MOS_STATUS CheckTeamsParams(bool &reused, SwFilter *filter, uint32_t index);

MOS_STATUS StoreTeamsParams(SwFilter *filter, uint32_t index);

Expand Down

0 comments on commit dbfb86c

Please sign in to comment.