Skip to content

Commit 6676f76

Browse files
[RT Decode] convert AV1 mfx profile from MFX to UMC parameter (#1802)
Issue: MDP-67712 Test: manually OSPR: Auto Co-authored-by: miaoshiw <stella.wu@intel.com>
1 parent 8ad5e51 commit 6676f76

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

_studio/mfx_lib/decode/av1/src/mfx_av1_dec_decode.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ VideoDECODEAV1::~VideoDECODEAV1()
142142
}
143143
}
144144

145+
inline
146+
mfxU16 av1_mfx_profile_to_native_profile(mfxU16 mfx)
147+
{
148+
switch (mfx)
149+
{
150+
case MFX_PROFILE_AV1_MAIN:
151+
return 0;
152+
case MFX_PROFILE_AV1_HIGH:
153+
return 1;
154+
case MFX_PROFILE_AV1_PRO:
155+
return 2;
156+
default:
157+
return mfx;
158+
}
159+
}
160+
145161
mfxStatus VideoDECODEAV1::Init(mfxVideoParam* par)
146162
{
147163
MFX_CHECK_NULL_PTR1(par);
@@ -226,6 +242,7 @@ mfxStatus VideoDECODEAV1::Init(mfxVideoParam* par)
226242
m_core->GetVA((mfxHDL*)&vp.pVideoAccelerator, MFX_MEMTYPE_FROM_DECODE);
227243

228244
ConvertMFXParamsToUMC(par, &vp);
245+
vp.info.profile = av1_mfx_profile_to_native_profile(par->mfx.CodecProfile);
229246

230247
UMC::Status umcSts = m_decoder->Init(&vp);
231248
MFX_CHECK(umcSts == UMC::UMC_OK, MFX_ERR_NOT_INITIALIZED);

0 commit comments

Comments
 (0)