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?
Thanks in advance.