• Resolved

H264 dynamic targetbit rate BUG. Doubling output rate.

On a DM368 system using the h264 encoder ( main profile, probably also other profile), with different rcAlgo's etc.

when I change the dynamic targetBitrate every frame (with 1 bit) the output bitrate   DOUBLES.

It seems that changing the bitrate does something like doubling the target allocation of bits for a frame.

Also changing once with 1 bit will give a local noticable peak in the bitrate .

And as said changing the bitrate every frame (+-1 bit) doubles the output bitrate.

Could there be something counted double in the TI code?

Note bitrate must be different at least one bit from the last update to have this behaviour.

dvsdk_2_10_00_17

h264enc 2.30.00.4

  • Hi Michael,

    Whenever you change the bitrate, the rate control module resets itself. Upon reset, it may optionally insert an IDR (depends on the parameter setting) and starts from default buffer level.

    This might be the reason why you see o/p bitrate doubling as you do this every frame. Idealy, you may like to change the bitrate only when desired. The kind of test you are doing may have side effects.

    regards

    Yashwant

  • In reply to Yashwant Dutt:

    Hi Yashwant,

    there is no IDR or I frame insertion.(Checked the stream for that).

    I can imagine indeed that the VBV level is reset, or something like that, although I don't think that should be done  (I think It the VBV level should scale with the bitrate).  Since the bitrate is allmost exactly doubled I still suspect something else is going on.

    regards,

    Michael

  • In reply to Michael Stuur:

    This was resolved over email.

    regards

    YD

  • In reply to Yashwant Dutt:

    Hi Yashwant,

    Would you mind posting how this issue was resolved?

    Thanks,

    Chris

  • In reply to Chris Richardson77843:

    The reason is our RC implementation does a .RC reset when it sees a bitrate or framerate change and puts in VBV level to default state. This causes the target bitrate becoming higher than target bitrate. Note that it may not always become twice, the resultant value depends on the current bitrate, delay, maxFrameSize etc.

     Below are workaround - 

     

    1.  Try reducing frequency of bitrate change control calls.

    2. There is a parameter called LBRmaxpicsize. This control the maximum size a picture can take. (see http://processors.wiki.ti.com/index.php/DM36x_Rate_Control_Modes and also the user guide). Whenever you see that the frequency of bitrate change is becoming higher, you can go and put a smaller value to LBRmaxpicsize and then restore it back when bitrate/channel rate rate becomes steady.

    We are also planning a fix for this issue, this would be available in the next release of the encoder(expected after few weeks).

    regards

    Yashwant

  • In reply to Yashwant Dutt:

    Hi Yashwant,

    Thank you for posting the information; this is useful to me as well.

    Chris