I implemented a constant bitrate control algorithm in the IPP 5.0 H.263 encoder, similar to the RateControl=2 bitrate control of the MPEG4 encoder. However, I see some artifacts (see attached file). They are the same artifacts I saw, when I used the MPEG4 encoder RateControl=2 option.
I know that these artifacts were solved for MPEG4 in the IPP5.1 examples. What I want to know is: which fixes were done for MPEG4 in IPP5.1 to remove these artifacts? I hope,I can add the same fixes to the H.263 encoder of 5.0.
Well, I implemented the rate control, according to the example of MPEG4. I just added DQUANT functionality.Some remarks:
EncodeMCBPC_I in h263_enc_frame.cpp. According to the H263 specification I changed the 7 into a 6.
In EncodePVOP of ippvideoencodermpeg4_vop.cpp. mNumNotCodedMB should be decreased when MBcurr->not_coded is set to 0 in the if (quant < VOP.vop_quant || dquant != 0) statement. When you do not do this mNumNotCodedMBcan get values larger than mNumMacroBlockPerVOP and this results invideo artefacts.