I amusingthe H.263(1996) encoder/decoder for our video conferencing application.
Currently we have a requirement of dynamic Intra-Frame encoding support.
The scenario is :
We are using GetFrame API of H263VideoEncoder class with VideoData as IN parameter and MediaData as OUT parameter.
Please suggest as to how to generate an I-Frame for H.263 codec.
SetFrameType(I_PICTURE) should be called for input VideoData object, not for output. It should be enough for H264 encoder.
For MPEG4 it doesnt work. More complex modifications are required. The idea is to change somehow the result of
isIVOP = (mFrameCount - mLastIVOP >= mIVOPdist);
which can be found twice in ippVideoEncoderMPEG4::EncodeFrame. There is no place in the code where FrameType from VideoData can directly affect these protected counters. Probably simplest way is to add public flag to ippVideoEncoderMPEG4 and switch it on in GetFrame() when I-frame is requested, then set isIVOP to true if the flag is set.
The patch to H263 [above] can be trusted to the same extent as ipp-SAMPLES are. It is proposed by the sample developer.