Skip to content

Commit

Permalink
[Encode] Fix coverity issues
Browse files Browse the repository at this point in the history
Fix coverity issues.
  • Loading branch information
Bossonor authored and intel-mediadev committed Dec 23, 2024
1 parent 46a7058 commit abf7bd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ namespace encode
EncodeReadBrcPakStatsParams readBrcPakStatsParams;
MOS_RESOURCE * osResource = nullptr;
uint32_t offset = 0;
m_statusReport->GetAddress(statusReportNumberPasses, osResource, offset);
ENCODE_CHK_STATUS_RETURN(m_statusReport->GetAddress(statusReportNumberPasses, osResource, offset));
RUN_FEATURE_INTERFACE_RETURN(HEVCEncodeBRC, HevcFeatureIDs::hevcBrcFeature, SetReadBrcPakStatsParams, ucPass, offset, osResource, readBrcPakStatsParams);
ReadBrcPakStatistics(&cmdBuffer, &readBrcPakStatsParams);
}
Expand Down Expand Up @@ -832,7 +832,7 @@ namespace encode
EncodeReadBrcPakStatsParams readBrcPakStatsParams;
MOS_RESOURCE *osResource = nullptr;
uint32_t offset = 0;
m_statusReport->GetAddress(statusReportNumberPasses, osResource, offset);
ENCODE_CHK_STATUS_RETURN(m_statusReport->GetAddress(statusReportNumberPasses, osResource, offset));
RUN_FEATURE_INTERFACE_RETURN(HEVCEncodeBRC, HevcFeatureIDs::hevcBrcFeature, SetReadBrcPakStatsParams, ucPass, offset, osResource, readBrcPakStatsParams);
ReadBrcPakStatistics(&cmdBuffer, &readBrcPakStatsParams);
}
Expand Down Expand Up @@ -1546,7 +1546,7 @@ MOS_STATUS HevcVdencPkt::AddAllCmds_HCP_PAK_INSERT_OBJECT_BRC(PMOS_COMMAND_BUFFE
miStoreRegMemParams.dwRegister = mmioRegisters->hcpEncImageStatusCtrlRegOffset;
ENCODE_CHK_STATUS_RETURN(m_miItf->MHW_ADDCMD_F(MI_STORE_REGISTER_MEM)(&cmdBuffer));

m_statusReport->GetAddress(statusReportImageStatusCtrlOfLastBRCPass, osResource, offset);
ENCODE_CHK_STATUS_RETURN(m_statusReport->GetAddress(statusReportImageStatusCtrlOfLastBRCPass, osResource, offset));
miStoreRegMemParams = {};
miStoreRegMemParams.presStoreBuffer = osResource;
miStoreRegMemParams.dwOffset = offset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ namespace encode {
auto mmioRegisters = m_hcpItf->GetMmioRegisters(m_vdboxIndex);
MOS_RESOURCE *osResource = nullptr;
uint32_t offset = 0;
m_statusReport->GetAddress(statusReportImageStatusCtrl, osResource, offset);
ENCODE_CHK_STATUS_RETURN(m_statusReport->GetAddress(statusReportImageStatusCtrl, osResource, offset));
//uint32_t baseOffset = (m_encodeStatusBuf.wCurrIndex * m_encodeStatusBuf.dwReportSize) + sizeof(uint32_t) * 2; // encodeStatus is offset by 2 DWs in the resource

// Write back the HCP image control register for RC6 may clean it out
Expand Down

0 comments on commit abf7bd8

Please sign in to comment.