I'm having problems to get correctly encoded interlaced videos, I'm using for testing the software encoder with ffmpeg muxing, for progressive videos works fine, but interlaced have artifacts both in vlc and quicktime.
For the encoding:
// declaration in the class
// interlaced set up
mfxEncParams.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_TFF;
m_EncExtParams = (mfxExtBuffer *)&m_mfxCopt;
mfxEncParams.NumExtParam = 1;
If not including m_mfxCopt.FramePicture = MFX_CODINGOPTION_ON the video has artifacts, that's ok
The problem is, for ffmpeg muxing it needs the SPS/PPS data, so to get it, after the mfxENC->Init(&mfxEncParams):
m_EncExtParams = (mfxExtBuffer*)&m_extSPSPPS;
sts = mfxENC->GetVideoParam(&mfxEncParams);
The SPS/PPS data is retieved ok and the encoded video plays in quicktime but it has exactly the same artifacts produced when m_mfxCopt.FramePicture = MFX_CODINGOPTION_ON is not set.
For testing, if the SPS/PPS data is not retrieved, the video seems to be ok it plays in vlc without artifacts, but of course not in quicktime.
I tried some combinations to set up the mfxExtCodingOptionSPSPPS before the first call to mfxENC->Query(&mfxEncParams, &mfxEncParams) and got error MFX_ERR_INCOMPATIBLE_VIDEO_PARAM
What would be the correct way to set the interlaced parameters and also get the SPS/PPS data?
thanks in advance