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 :
- H.263 encoder is initialized and running.It is pumping the encoded data as per the expectation with encoder settings as 176 X 144 , 64/128kbps , 15 fps.
- Now the client requests toan H.263 Intra-Frameat the earliest.
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.