Is "NumRefFrame" must be even number?

Is "NumRefFrame" must be even number?

hi,I am using MSDK to encode my yuv data.

If I set "NumRefFrame" in mfxVideoParam struct to 3,I will get "MFX_WRN_INCOMPATIBLE_VIDEO_PARAM" when exectue "m_pmfxENC->Init()".After "m_pmfxENC->Init()",I called MFXVideoENCODE_GetVideoParam() with a mfxVideoParam struct,to check the parameters that I have set,I found the "NumRefFrame" changed to 4 automatically.Then I check the output stream,"num_ref_frames" in the SPS is 4.This result is under MFX_IMPL_HARDWARE mode.

if I set "NumRefFrame" in mfxVideoParam struct to 5,"num_ref_frames" of the SPS in the ouput stream is 6.This result is also under MFX_IMPL_HARDWARE mode.

And when I use MFX_IMPL_SOFTWARE mode,when I set "NumRefFrame" to 3,then "num_ref_frames" in the SPS of the output stream is 3,and there is no "MFX_WRN_INCOMPATIBLE_VIDEO_PARAM".

That is to say,under MFX_IMPL_SOFTWARE mode,I could got the output stream that i want,and under MFX_IMPL_HARDWARE mode,the reference frame number changed to even number automatically.
Now,I want to use MFX_IMPL_HARDWARE mode,and get a output stream of reference frame number is 3.
Could anyone tell me how to set the encoding parameters so that the reference number of the output stream could be 3(odd number) under hardware mode?

Regards.
Thanks in advance.

3 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi,

Yes, you have encountered a known HW encoder limitation. The current HW encoder cannot produce streams with odd number of reference frames.
We are sorry for this inconvenience and we are working on addressing this in future platform releases.

Regards,
Petter

Hi,Petter
Thanks for your kindly reply,and hope Intel could fix this limitation in the near future.
Regards.
Wei Liang

Melden Sie sich an, um einen Kommentar zu hinterlassen.