Skip to content

Commit

Permalink
[Encode] Improve readability in MHW and const settings
Browse files Browse the repository at this point in the history
Improve readability in MHW and const settings by removing redundancy.
  • Loading branch information
walter-bai authored and intel-mediadev committed Nov 30, 2023
1 parent 4d72c1e commit 474256a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,15 @@ namespace encode
// for VP9 VDEnc this is bit used for programming of "segmentation_temporal_update"
// for AV1 VDEnc this bit indicates negative of "segmentation_update_map"
params.segmentationTemporal = m_segmentParams.m_updateMap ? false : true;
params.vdencCmd2Par113 = true;
#if _MEDIA_RESERVED
params.vdencCmd2Par113 = true;
#else
params.extSettings.emplace_back(
[this](uint32_t *data) {
data[54] |= 1 << 15;
return MOS_STATUS_SUCCESS;
});
#endif // _MEDIA_RESERVED
}

for (auto i = 0; i < av1MaxSegments; i++)
Expand Down
21 changes: 0 additions & 21 deletions media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_cmdpar.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,27 +565,6 @@ struct _MHW_PAR_T(VDENC_CMD2)
uint32_t intraRefreshBoundary[3] = {};
uint8_t av1RefId[2][4] = {{1, 1, 1, 1}, {1, 1, 1, 1}};
uint8_t subPelMode = 3;
bool vdencCmd2Par113 = false;
uint8_t vdencCmd2Par114 = 0;
uint8_t vdencCmd2Par115 = 0;
uint8_t vdencCmd2Par116 = 0;
uint8_t vdencCmd2Par117 = 0;
uint8_t vdencCmd2Par118 = 0;
uint8_t vdencCmd2Par119 = 0;
uint8_t vdencCmd2Par120 = 0;
uint8_t vdencCmd2Par121 = 0;
uint8_t vdencCmd2Par122 = 0;
uint8_t vdencCmd2Par123 = 0;
uint8_t vdencCmd2Par124 = 0;
uint8_t vdencCmd2Par125 = 0;
uint8_t vdencCmd2Par126 = 0;
uint8_t vdencCmd2Par127 = 0;
uint8_t vdencCmd2Par128 = 0;
uint8_t vdencCmd2Par129 = 0;
uint8_t vdencCmd2Par130 = 0;
uint8_t vdencCmd2Par131 = 0;
uint8_t vdencCmd2Par132 = 0;
bool vdencCmd2Par133 = false;

__MHW_VDBOX_VDENC_WRAPPER(
std::vector<std::function<MOS_STATUS(uint32_t *)>> extSettings);
Expand Down

0 comments on commit 474256a

Please sign in to comment.