Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[All] Using code lower scope micro-optimization #1877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions media_driver/agnostic/common/codec/hal/codechal_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,9 @@ uint32_t CodechalHwInterface::ComposeSurfaceCacheabilityControl(
{
CODECHAL_HW_FUNCTION_ENTER;

MHW_MEMORY_OBJECT_CONTROL_PARAMS cacheSetting = m_cacheabilitySettings[cacheabiltySettingIdx];

if (m_noSeparateL3LlcCacheabilitySettings)
{
MHW_MEMORY_OBJECT_CONTROL_PARAMS cacheSetting = m_cacheabilitySettings[cacheabiltySettingIdx];
if (cacheabilityTypeRequested == codechalUncacheableWa)
{
if (cacheSetting.Gen8.TargetCache == CODECHAL_MO_TARGET_CACHE_ELLC)
Expand Down
22 changes: 11 additions & 11 deletions media_driver/agnostic/gen12/codec/hal/codechal_encode_hevc_g12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1811,25 +1811,19 @@ MOS_STATUS CodechalEncHevcStateG12::GetFrameBrcLevel()

//if L0/L1 both points to previous frame, then its LBD otherwise its is level 1 RA B.
auto B_or_LDB_brclevel = m_lowDelay ? HEVC_BRC_FRAME_TYPE_P_OR_LB : HEVC_BRC_FRAME_TYPE_B;
std::map<int, HEVC_BRC_FRAME_TYPE> codingtype_to_brclevel{
{I_TYPE, HEVC_BRC_FRAME_TYPE_I},
{P_TYPE, HEVC_BRC_FRAME_TYPE_P_OR_LB},
{B_TYPE, B_or_LDB_brclevel},
{B1_TYPE, HEVC_BRC_FRAME_TYPE_B1},
{B2_TYPE, HEVC_BRC_FRAME_TYPE_B2}};

//Both I or P/LDB type at same HierarchLevelPlus1
auto intra_LDBFrame_to_Brclevel = (m_pictureCodingType == I_TYPE) ? HEVC_BRC_FRAME_TYPE_I : HEVC_BRC_FRAME_TYPE_P_OR_LB;
std::map<int, HEVC_BRC_FRAME_TYPE> hierchLevelPlus1_to_brclevel{
{1, intra_LDBFrame_to_Brclevel},
{2, HEVC_BRC_FRAME_TYPE_B},
{3, HEVC_BRC_FRAME_TYPE_B1},
{4, HEVC_BRC_FRAME_TYPE_B2}};

if (m_hevcSeqParams->HierarchicalFlag && m_hevcSeqParams->GopRefDist > 1 && m_hevcSeqParams->GopRefDist <= 8)
{
if (m_hevcPicParams->HierarchLevelPlus1 > 0) // LDB or RAB
{
std::map<int, HEVC_BRC_FRAME_TYPE> hierchLevelPlus1_to_brclevel{
{1, intra_LDBFrame_to_Brclevel},
{2, HEVC_BRC_FRAME_TYPE_B},
{3, HEVC_BRC_FRAME_TYPE_B1},
{4, HEVC_BRC_FRAME_TYPE_B2}};
m_currFrameBrcLevel = hierchLevelPlus1_to_brclevel.count(m_hevcPicParams->HierarchLevelPlus1) ? hierchLevelPlus1_to_brclevel[m_hevcPicParams->HierarchLevelPlus1] : HEVC_BRC_FRAME_TYPE_INVALID;
//Invalid HierarchLevelPlus1 or LBD frames at level 3 eror check.
if ((m_currFrameBrcLevel == HEVC_BRC_FRAME_TYPE_INVALID) ||
Expand All @@ -1843,6 +1837,12 @@ MOS_STATUS CodechalEncHevcStateG12::GetFrameBrcLevel()
{
if (!m_hevcSeqParams->LowDelayMode) // RA B
{
std::map<int, HEVC_BRC_FRAME_TYPE> codingtype_to_brclevel{
{I_TYPE, HEVC_BRC_FRAME_TYPE_I},
{P_TYPE, HEVC_BRC_FRAME_TYPE_P_OR_LB},
{B_TYPE, B_or_LDB_brclevel},
{B1_TYPE, HEVC_BRC_FRAME_TYPE_B1},
{B2_TYPE, HEVC_BRC_FRAME_TYPE_B2}};
m_currFrameBrcLevel = codingtype_to_brclevel.count(m_pictureCodingType) ? codingtype_to_brclevel[m_pictureCodingType] : HEVC_BRC_FRAME_TYPE_INVALID;
//Invalid CodingType.
if (m_currFrameBrcLevel == HEVC_BRC_FRAME_TYPE_INVALID)
Expand Down
4 changes: 2 additions & 2 deletions media_driver/agnostic/gen9/cm/cm_hal_g9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,8 +1304,6 @@ MOS_STATUS CM_HAL_G9_X::AllocateSIPCSRResource()

MOS_STATUS CM_HAL_G9_X::GetGenStepInfo(char*& stepInfoStr)
{
const char *cmSteppingInfo[] = { "A", "B", "C", "D", "E", "F",
"G", "H", "I", "J" };
uint32_t genStepId = m_cmState->platform.usRevId;

if (m_steppingTable.size() != 0) //check if the stepping table been overwritten
Expand All @@ -1321,6 +1319,8 @@ MOS_STATUS CM_HAL_G9_X::GetGenStepInfo(char*& stepInfoStr)
}
else
{
const char *cmSteppingInfo[] = { "A", "B", "C", "D", "E", "F",
"G", "H", "I", "J" };
if (genStepId < sizeof(cmSteppingInfo)/sizeof(const char *))
{
stepInfoStr = (char *)cmSteppingInfo[genStepId];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ namespace decode
CODEC_HEVC_SLICE_PARAMS *sliceParams = m_hevcSliceParams + sliceIdx;
int8_t *pRefIdxMapping = 0;
int pocCurrPic = 0;
int32_t pocList[CODEC_MAX_NUM_REF_FRAME_HEVC] = {};
uint16_t refFieldPicFlag = 0;
uint16_t refBottomFieldFlag = 0;
CODEC_PICTURE refPicList[2][CODEC_MAX_NUM_REF_FRAME_HEVC] = {};

if (!m_hcpItf->IsHevcISlice(sliceParams->LongSliceFlags.fields.slice_type))
{
int32_t pocList[CODEC_MAX_NUM_REF_FRAME_HEVC] = {};
HevcReferenceFrames &refFrames = m_hevcBasicFeature->m_refFrames;
DECODE_CHK_STATUS(refFrames.FixSliceRefList(*m_hevcPicParams, *sliceParams));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,10 +910,10 @@ MHW_SETPAR_DECL_SRC(VDENC_CMD2, Av1ReferenceFrames)
}
}

CODEC_Ref_Frame_Ctrl_AV1 refCtrlL0 = m_basicFeature->m_av1PicParams->ref_frame_ctrl_l0;
CODEC_Ref_Frame_Ctrl_AV1 refCtrlL1 = m_basicFeature->m_av1PicParams->ref_frame_ctrl_l1;
if (m_basicFeature->m_enableNonDefaultMapping)
{
CODEC_Ref_Frame_Ctrl_AV1 refCtrlL0 = m_basicFeature->m_av1PicParams->ref_frame_ctrl_l0;
CODEC_Ref_Frame_Ctrl_AV1 refCtrlL1 = m_basicFeature->m_av1PicParams->ref_frame_ctrl_l1;
params.av1RefId[0][0] = refCtrlL0.RefFrameCtrl.fields.search_idx0;
params.av1RefId[0][1] = refCtrlL0.RefFrameCtrl.fields.search_idx1;
params.av1RefId[0][2] = refCtrlL0.RefFrameCtrl.fields.search_idx2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3219,19 +3219,18 @@ MOS_STATUS HevcVdencPkt::AddAllCmds_HCP_PAK_INSERT_OBJECT_BRC(PMOS_COMMAND_BUFFE
PCODEC_HEVC_ENCODE_PICTURE_PARAMS hevcPicParams = (CODEC_HEVC_ENCODE_PICTURE_PARAMS *)m_hevcPicParams;
PCODEC_HEVC_ENCODE_SLICE_PARAMS hevcSlcParams = (CODEC_HEVC_ENCODE_SLICE_PARAMS *)&m_hevcSliceParams[currSlcIdx];

CODEC_PICTURE currPic = {};
CODEC_PICTURE refPicList[2][CODEC_MAX_NUM_REF_FRAME_HEVC] = {};
void ** hevcRefList = nullptr;
int32_t pocCurrPic = 0;
int8_t * pRefIdxMapping = nullptr;
int32_t pocList[CODEC_MAX_NUM_REF_FRAME_HEVC] = {};

if (hevcSlcParams->slice_type != encodeHevcISlice)
{
currPic = hevcPicParams->CurrReconstructedPic;
params.ucList = LIST_0;
params.numRefIdxLRefpiclistnumActiveMinus1 = hevcSlcParams->num_ref_idx_l0_active_minus1;
eStatus = MOS_SecureMemcpy(&refPicList, sizeof(refPicList), &hevcSlcParams->RefPicList, sizeof(hevcSlcParams->RefPicList));
int32_t pocList[CODEC_MAX_NUM_REF_FRAME_HEVC] = {};
CODEC_PICTURE currPic = hevcPicParams->CurrReconstructedPic;
params.ucList = LIST_0;
params.numRefIdxLRefpiclistnumActiveMinus1 = hevcSlcParams->num_ref_idx_l0_active_minus1;
eStatus = MOS_SecureMemcpy(&refPicList, sizeof(refPicList), &hevcSlcParams->RefPicList, sizeof(hevcSlcParams->RefPicList));
if (eStatus != MOS_STATUS_SUCCESS)
{
ENCODE_ASSERTMESSAGE("Failed to copy memory.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1283,19 +1283,18 @@ namespace encode
auto &params = m_hcpItf->MHW_GETPAR_F(HCP_REF_IDX_STATE)();
params = {};

CODEC_PICTURE currPic = {};
CODEC_PICTURE refPicList[2][CODEC_MAX_NUM_REF_FRAME_HEVC] = {};
void ** hevcRefList = nullptr;
int32_t pocCurrPic = 0;
int8_t * pRefIdxMapping = nullptr;
int32_t pocList[CODEC_MAX_NUM_REF_FRAME_HEVC] = {};

if (m_basicFeature->m_preEncConfig.SliceType != encodeHevcISlice)
{
currPic = m_basicFeature->m_preEncConfig.CurrReconstructedPic;
params.ucList = LIST_0;
params.numRefIdxLRefpiclistnumActiveMinus1 = 0;
eStatus = MOS_SecureMemcpy(&refPicList, sizeof(refPicList), &m_basicFeature->m_preEncConfig.RefPicList, sizeof(m_basicFeature->m_preEncConfig.RefPicList));
int32_t pocList[CODEC_MAX_NUM_REF_FRAME_HEVC] = {};
CODEC_PICTURE currPic = m_basicFeature->m_preEncConfig.CurrReconstructedPic;
params.ucList = LIST_0;
params.numRefIdxLRefpiclistnumActiveMinus1 = 0;
eStatus = MOS_SecureMemcpy(&refPicList, sizeof(refPicList), &m_basicFeature->m_preEncConfig.RefPicList, sizeof(m_basicFeature->m_preEncConfig.RefPicList));
if (eStatus != MOS_STATUS_SUCCESS)
{
ENCODE_ASSERTMESSAGE("Failed to copy memory.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ MHW_SETPAR_DECL_SRC(VDENC_HEVC_VP9_TILE_SLICE_STATE, Vp9EncodeTile)
ENCODE_CHK_NULL_RETURN(vp9BasicFeature);
auto picParams = vp9BasicFeature->m_vp9PicParams;
ENCODE_CHK_NULL_RETURN(picParams);
auto tileCodingParams = m_curTileCodingParams;
params.ctbSize = CODEC_VP9_SUPER_BLOCK_WIDTH;

if (!m_enabled)
Expand All @@ -670,6 +669,7 @@ MHW_SETPAR_DECL_SRC(VDENC_HEVC_VP9_TILE_SLICE_STATE, Vp9EncodeTile)
}
else
{
auto tileCodingParams = m_curTileCodingParams;
params.tileWidth = ((tileCodingParams.TileWidthInMinCbMinus1 + 1) * CODEC_VP9_MIN_BLOCK_WIDTH);
params.tileHeight = ((tileCodingParams.TileHeightInMinCbMinus1 + 1) * CODEC_VP9_MIN_BLOCK_HEIGHT);

Expand Down Expand Up @@ -706,7 +706,6 @@ MHW_SETPAR_DECL_SRC(VDENC_WALKER_STATE, Vp9EncodeTile)
ENCODE_CHK_NULL_RETURN(vp9BasicFeature);
auto picParams = vp9BasicFeature->m_vp9PicParams;
ENCODE_CHK_NULL_RETURN(picParams);
auto tileCodingParams = m_curTileCodingParams;

if (!m_enabled)
{
Expand All @@ -716,6 +715,7 @@ MHW_SETPAR_DECL_SRC(VDENC_WALKER_STATE, Vp9EncodeTile)
}
else
{
auto tileCodingParams = m_curTileCodingParams;
params.tileSliceStartLcuMbX = tileCodingParams.TileStartLCUX;
params.tileSliceStartLcuMbY = tileCodingParams.TileStartLCUY;

Expand Down
60 changes: 28 additions & 32 deletions media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,22 +168,6 @@ class Impl : public Itf, public mhw::Impl
}
case RowStorePar::HEVC:
{
constexpr bool enable[16][5] =
{
{1, 1, 1, 0, 1}, {1, 1, 1, 1, 1}, {1, 1, 0, 0, 0}, {1, 1, 0, 1, 0},
{1, 1, 1, 1, 1}, {1, 1, 0, 0, 1}, {1, 1, 1, 0, 0}, {1, 0, 1, 0, 1},
{1, 1, 1, 0, 0}, {1, 0, 1, 0, 1}, {1, 1, 1, 1, 1}, {1, 1, 0, 1, 1},
{1, 1, 1, 1, 1}, {1, 0, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 0, 1, 1, 1}
};

constexpr uint32_t address[16][5] =
{
{0, 256, 1280, 0, 2048}, {0, 256, 1280, 1824, 1792}, {0, 512, 0, 0, 0}, {0, 256, 0, 2304, 0},
{0, 256, 1024, 0, 1792}, {0, 512, 0, 0, 2048}, {0, 256, 1792, 0, 0}, {0, 0, 512, 0, 2048},
{0, 256, 1792, 0, 0}, {0, 0, 256, 0, 1792}, {0, 256, 1024, 1568, 1536}, {0, 512, 0, 2112, 2048},
{0, 256, 1792, 2336, 2304}, {0, 0, 512, 1600, 1536}, {0, 128, 1664, 2336, 2304}, {0, 0, 256, 1600, 1536}
};

bool isLcu32or64 = par.lcuSize == RowStorePar::SIZE_32 || par.lcuSize == RowStorePar::SIZE_64;
bool isGt4k = par.frameWidth > 4096;
bool isGt8k = par.frameWidth > 8192;
Expand All @@ -201,9 +185,23 @@ class Impl : public Itf, public mhw::Impl

if (!isGt8k && this->m_rowStoreCache.vdenc.supported)
{
constexpr bool enable[16][5] =
{
{1, 1, 1, 0, 1}, {1, 1, 1, 1, 1}, {1, 1, 0, 0, 0}, {1, 1, 0, 1, 0},
{1, 1, 1, 1, 1}, {1, 1, 0, 0, 1}, {1, 1, 1, 0, 0}, {1, 0, 1, 0, 1},
{1, 1, 1, 0, 0}, {1, 0, 1, 0, 1}, {1, 1, 1, 1, 1}, {1, 1, 0, 1, 1},
{1, 1, 1, 1, 1}, {1, 0, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 0, 1, 1, 1}
};
this->m_rowStoreCache.vdenc.enabled = enable[index][3];
if (this->m_rowStoreCache.vdenc.enabled)
{
constexpr uint32_t address[16][5] =
{
{0, 256, 1280, 0, 2048}, {0, 256, 1280, 1824, 1792}, {0, 512, 0, 0, 0}, {0, 256, 0, 2304, 0},
{0, 256, 1024, 0, 1792}, {0, 512, 0, 0, 2048}, {0, 256, 1792, 0, 0}, {0, 0, 512, 0, 2048},
{0, 256, 1792, 0, 0}, {0, 0, 256, 0, 1792}, {0, 256, 1024, 1568, 1536}, {0, 512, 0, 2112, 2048},
{0, 256, 1792, 2336, 2304}, {0, 0, 512, 1600, 1536}, {0, 128, 1664, 2336, 2304}, {0, 0, 256, 1600, 1536}
};
this->m_rowStoreCache.vdenc.dwAddress = address[index][3];
}
}
Expand All @@ -228,22 +226,6 @@ class Impl : public Itf, public mhw::Impl
case RowStorePar::VP9:
{
// HVD, Meta/MV, DeBlock, VDEnc
const bool enableVP9[13][4] =
{
{ 1, 1, 1, 1 }, { 0, 0, 1, 1 }, { 1, 0, 1, 1 }, { 1, 1, 0, 1 },
{ 1, 1, 1, 1 }, { 0, 0, 1, 1 }, { 0, 0, 1, 0 }, { 1, 1, 0, 1 },
{ 1, 1, 1, 1 }, { 1, 1, 0, 1 }, { 1, 1, 1, 1 }, { 1, 1, 0, 1 },
{ 1, 1, 0, 1 }
};

const uint32_t addressVP9[13][4] =
{
{ 0, 64, 384, 1536, }, { 0, 0, 0, 2304, }, { 0, 0, 64, 2368, }, { 0, 128, 0, 768, },
{ 0, 64, 384, 1536, }, { 0, 0, 0, 2304, }, { 0, 0, 0, 0, }, { 0, 128, 0, 768, },
{ 0, 64, 384, 2112, }, { 0, 128, 0, 768, }, { 0, 32, 192, 1920, }, { 0, 128, 0, 768, },
{ 0, 128, 0, 768, }
};

if(this->m_rowStoreCache.vdenc.supported)
{
bool is8bit = par.bitDepth == RowStorePar::DEPTH_8;
Expand All @@ -268,9 +250,23 @@ class Impl : public Itf, public mhw::Impl

if(!isGt8k)
{
constexpr bool enableVP9[13][4] =
{
{ 1, 1, 1, 1 }, { 0, 0, 1, 1 }, { 1, 0, 1, 1 }, { 1, 1, 0, 1 },
{ 1, 1, 1, 1 }, { 0, 0, 1, 1 }, { 0, 0, 1, 0 }, { 1, 1, 0, 1 },
{ 1, 1, 1, 1 }, { 1, 1, 0, 1 }, { 1, 1, 1, 1 }, { 1, 1, 0, 1 },
{ 1, 1, 0, 1 }
};
this->m_rowStoreCache.vdenc.enabled = enableVP9[index][3];
if(this->m_rowStoreCache.vdenc.enabled)
{
const uint32_t addressVP9[13][4] =
{
{ 0, 64, 384, 1536, }, { 0, 0, 0, 2304, }, { 0, 0, 64, 2368, }, { 0, 128, 0, 768, },
{ 0, 64, 384, 1536, }, { 0, 0, 0, 2304, }, { 0, 0, 0, 0, }, { 0, 128, 0, 768, },
{ 0, 64, 384, 2112, }, { 0, 128, 0, 768, }, { 0, 32, 192, 1920, }, { 0, 128, 0, 768, },
{ 0, 128, 0, 768, }
};
this->m_rowStoreCache.vdenc.dwAddress = addressVP9[index][3];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ std::string Configure::GetReadPath(
std::shared_ptr<Definition> def,
uint32_t option)
{
std::string path = "";
if (def == nullptr)
{
std::string path = "";
return path;
}

Expand All @@ -303,9 +303,9 @@ std::string Configure::GetReportPath(
std::shared_ptr<Definition> def,
uint32_t option)
{
std::string path = "";
if (def == nullptr)
{
std::string path = "";
return path;
}
if (option == MEDIA_USER_SETTING_INTERNAL)
Expand All @@ -320,10 +320,10 @@ std::string Configure::GetReportPath(

std::string Configure::GetExternalPath(uint32_t option)
{
std::string path = "";
auto it = m_pathOption.find(option);
if (it != m_pathOption.end())
{
std::string path = "";
if (it->second.bStated && m_keyPathInfo != nullptr && m_keyPathInfo->Path != nullptr)
{
path = m_keyPathInfo->Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ MOS_STATUS VpResourceManager::AssignIntermediaSurface(VP_EXECUTE_CAPS& caps, SwF

VP_SURFACE *outputSurface = executedFilters.GetSurface(false, 0);
VP_SURFACE *intermediaSurface = nullptr;
VP_SURFACE_PARAMS params = {};
if (outputSurface)
{
// No need intermedia surface.
Expand All @@ -940,6 +939,7 @@ MOS_STATUS VpResourceManager::AssignIntermediaSurface(VP_EXECUTE_CAPS& caps, SwF
}
bool allocated = false;
// Get surface parameter.
VP_SURFACE_PARAMS params = {};
GetIntermediaOutputSurfaceParams(caps, params, executedFilters);

VP_PUBLIC_CHK_STATUS_RETURN(m_allocator.ReAllocateSurface(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ MOS_STATUS VpPipelineAdapterBase::GetVpMhwInterface(
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
bool sfcNeeded = false;
bool veboxNeeded = false;
std::shared_ptr<mhw::vebox::Itf> veboxItf = nullptr;
std::shared_ptr<mhw::sfc::Itf> sfcItf = nullptr;
std::shared_ptr<mhw::mi::Itf> miItf = nullptr;
m_osInterface = m_vpPlatformInterface.GetOsInterface();
if (m_osInterface == nullptr)
{
Expand Down Expand Up @@ -96,6 +93,9 @@ MOS_STATUS VpPipelineAdapterBase::GetVpMhwInterface(
SetMhwMiItf(m_vprenderHal->pRenderHalPltInterface->GetMhwMiItf());
if ((veboxNeeded || sfcNeeded) && !m_clearVideoViewMode)
{
std::shared_ptr<mhw::vebox::Itf> veboxItf = nullptr;
std::shared_ptr<mhw::sfc::Itf> sfcItf = nullptr;
std::shared_ptr<mhw::mi::Itf> miItf = nullptr;
eStatus = VphalDevice::CreateVPMhwInterfaces(sfcNeeded, veboxNeeded, veboxItf, sfcItf, miItf, m_osInterface);
if (eStatus == MOS_STATUS_SUCCESS)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
uint32_t value = 0;
uint32_t mode = 0;
MediaUserSettingSharedPtr userSettingPtr = nullptr;

MOS_OS_FUNCTION_ENTER;

Expand All @@ -90,7 +89,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
}
m_fd = osDriverContext->fd;

userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext);
MediaUserSettingSharedPtr userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext);

m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType);
if (nullptr == m_bufmgr)
Expand Down