Skip to content

Commit

Permalink
[Media Common] [VP] fix coverity issue
Browse files Browse the repository at this point in the history
fix coverity issue!
  • Loading branch information
Dylan-debug authored and intel-mediadev committed Aug 25, 2023
1 parent c7cd5a6 commit 24098df
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion media_driver/agnostic/gen10/hw/mhw_vebox_g10_X.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ MOS_STATUS MhwVeboxInterfaceG10::AddVeboxDiIecp(
ResourceParams.dwLsbNum = MHW_VEBOX_DI_IECP_SHIFT;
ResourceParams.presResource = pVeboxDiIecpCmdParams->pOsResCurrInput;
ResourceParams.dwOffset = pVeboxDiIecpCmdParams->dwCurrInputSurfOffset;
ResourceParams.pdwCmd = & (cmd.DW2.Value);
ResourceParams.pdwCmd = &(cmd.DW2.Value);
ResourceParams.dwLocationInCmd = 2;
ResourceParams.HwCommandType = MOS_VEBOX_DI_IECP;

Expand Down
14 changes: 12 additions & 2 deletions media_driver/agnostic/gen12/vp/hal/vphal_render_vebox_g12_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,16 +517,21 @@ MOS_STATUS VPHAL_VEBOX_STATE_G12_BASE::GetOutputSurfParams(
bool VPHAL_VEBOX_STATE_G12_BASE::IsDNOnly()
{
PVPHAL_VEBOX_RENDER_DATA pRenderData = GetLastExecRenderData();
VPHAL_RENDER_CHK_NULL_NO_STATUS(pRenderData);

return pRenderData->bDenoise &&
(!pRenderData->bDeinterlace) &&
(!IsQueryVarianceEnabled()) &&
(!IsIECPEnabled());
finish:
return false;
}

bool VPHAL_VEBOX_STATE_G12_BASE::IsFFDISurfNeeded()
{
PVPHAL_VEBOX_RENDER_DATA pRenderData = GetLastExecRenderData();
VPHAL_RENDER_CHK_NULL_NO_STATUS(pRenderData);


if (pRenderData->bDeinterlace ||
IsQueryVarianceEnabled() ||
Expand All @@ -539,6 +544,8 @@ bool VPHAL_VEBOX_STATE_G12_BASE::IsFFDISurfNeeded()
{
return false;
}
finish:
return false;
}

bool VPHAL_VEBOX_STATE_G12_BASE::IsFFDNSurfNeeded()
Expand All @@ -552,8 +559,11 @@ bool VPHAL_VEBOX_STATE_G12_BASE::IsFFDNSurfNeeded()

bool VPHAL_VEBOX_STATE_G12_BASE::IsSTMMSurfNeeded()
{

return (GetLastExecRenderData()->bDenoise || GetLastExecRenderData()->bDeinterlace);
PVPHAL_VEBOX_RENDER_DATA pRenderData = GetLastExecRenderData();
VPHAL_RENDER_CHK_NULL_NO_STATUS(pRenderData);
return (pRenderData->bDenoise || pRenderData->bDeinterlace);
finish:
return false;
}

//!
Expand Down
2 changes: 1 addition & 1 deletion media_softlet/agnostic/common/hw/mhw_utilities_next.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ MOS_STATUS Mhw_SendGenericPrologCmdNext(
params.pOsResource = pParams->presStoreData;
params.dwResourceOffset = pParams->dwStoreDataOffset;
params.dwDataDW1 = pParams->dwStoreDataValue;
miItf->MHW_ADDCMD_F(MI_FLUSH_DW)(pCmdBuffer);
MHW_CHK_STATUS_RETURN(miItf->MHW_ADDCMD_F(MI_FLUSH_DW)(pCmdBuffer));
}

MHW_CHK_STATUS_RETURN(miItf->AddProtectedProlog(pCmdBuffer));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,13 +858,14 @@ bool VpRenderCmdPacket::IsRenderUncompressedWriteNeeded(PVP_SURFACE VpSurface)
}

byteInpixel = VpSurface->osSurface->OsResource.pGmmResInfo->GetBitsPerPixel() >> 3;
#endif // !EMUL

if (byteInpixel == 0)
{
VP_RENDER_NORMALMESSAGE("surface format is not a valid format for Render");
return false;
}
#endif // !EMUL

uint32_t writeAlignInWidth = 32 / byteInpixel;
uint32_t writeAlignInHeight = 8;

Expand Down

0 comments on commit 24098df

Please sign in to comment.