Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Is "NumRefFrame" must be even number?

Wei_Liang
Beginner
330 Views

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.

0 Kudos
2 Replies
Petter_L_Intel
Employee
330 Views
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
0 Kudos
Wei_Liang
Beginner
330 Views
Hi,Petter Thanks for your kindly reply,and hope Intel could fix this limitation in the near future. Regards. Wei Liang
0 Kudos
Reply