I'm using the h264 codec from the extended BSP (ivahd_h264enc_02_00_02_02_production)
Codec is configured with 2 calls:
* Read OMX_VIDEO_PARAM_STATICPARAMS from codec, adapt settings & write back.
* Read OMX_VIDEO_CONFIG_DYNAMICPARAMS from codec, adapt settings & write back.
Following settings are changed:
* Static:
videoStaticParams.h264EncStaticParams.videnc2Params.encodingPreset = 3; /* XDM_USER_DEFINED */
videoStaticParams.h264EncStaticParams.videnc2Params.rateControlPreset = 2; /* IVIDEO_STORAGE (VBR) */
videoStaticParams.h264EncStaticParams.videnc2Params.level = 50 /* IH264_LEVEL_50 */
videoStaticParams.h264EncStaticParams.IDRFrameInterval = 1; /* each Iframe is an IDR frame */
videoStaticParams.h264EncStaticParams.entropyCodingMode = 0; /*IH264_ENTROPYCODING_DEFAULT */
videoStaticParams.h264EncStaticParams.transformBlockSize = 2; /* IH264_TRANSFORM_DEFAULT */
* dynamic:
videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.intraFrameInterval = 60; /* 1 Iframe / sec */
videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.targetFrameRate = 60000; /* 1000 * the expected framerate */
videoDynamicParams.h264EncDynamicParams.videnc2DynamicParams.targetBitRate = 4000000; /* 4MBit */
I need the IDRFramerate interval. We have one I frame each second, and we need to be able to pick up the stream from that Iframe on, so it must be an IDR frame. (not that fancy)
For most of our content, the bit-rate will remain within this limit. (4 MB/sec)
BUT: for some specific very high moving, very high frequency content, this limit isn't respected. I've seen (continuous) bit-rates of > 48MBit.
In fact, the 'targetBitRate' doesn't change anything for this content. It doesn't matter if it's 10MBit, 2MBit, 512Kbit.
There is a parameter called maxBitRate, but this doesn't seem to do anything.
I switched to IVIDEO_LOWDELAY (CBR), but the problem remains.
In this specific case, severe image degradation is acceptable. Unbound bit-rate is not.
What can we do to prevent this bitrate?
I can't simply post images on e2e. (NDA)
But I can provide images / h264 stream via mail / ftp.