This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

VBR vs CBR Bit Rate Control Problem, h.264, DM6467, DVSDK 3.10

This question is regarding the use of the h.264 encoder in the DVSDK 3.10.00.19 on the DM6467 platform:

I'm trying to implement runtime control of bit rate on this platform however I'm not getting the results I am expecting. The encoding is of a D1 stream (720x480) @ 29.97fps (captured NTSC).

I'm trying to achieve 2 rate controls, CVBR (constrained variable) & CBR (constant). My experimentation consists of modifying the following variables in the XDM video encoder structures:

IVIDENC1_Params.maxBitRate
IVIDENC1_Params.rateControlPreset
IVIDENC1_DynamicParams.targetBitRate

The issue I'm seeing is
1. there is no noticeable difference in the encoding between VBR (IVIDEO_STORAGE, 2) and CBR (IVIDEO_LOW_DELAY, 1) on rateControlPreset when I analyze the bit rate.
2. the maxBitRate doesn't seem to have any effect on the encoded video. Note: I am only expecting this to have an affect when VBR is used.

targetBitRate on the other hand clearly has an affect when I examine the encoding. That appears to work great. Since I know this works, I hold this variable constant during the test. I'm running with the target at 1333000 (1.3Mbps) and I adjust the max anywhere between 3 and 6 Mbps. I have tried other combinations too and no good.  It's almost as if the encoder always runs in CBR mode all the time even if I specify VBR and that it doesn't use the max bit rate argument at all.  I do know the rateControlPreset is being used because if I switch it to IVIDEO_NONE the bitrate goes up drastically (to like 24Mbps).  The User Guide doesn't say that VBR & maxbitarte are unimplemented (some arguments do say this but not these).

The way I'm analyzing the video is using a free Windows tool called Bitrate Viewer (google "bit rate viewer" and it'll be the first hit). The analysis is a bit qualitative because I'm just looking at a graph but it does let you see the rate down to the frame level. Plus I know this encoder can produce higher bit rates but it does not during panning scenes or even if I encode a video of white noise (which should be more "complex").

I can provide any supporting encodings, the remaining encoding paramaters,etc, if needed.

Any help with this would be much appreciated!!

Regards,
Dave

  • Hi,

    IVIDENC1_Params.maxBitrate has no effect on rate control dynamics. Its just a value which tells the RC that the provided targetBitrate will be lower than the maxBitrate. Its more of a parameter check.

    Note that both VBR (IVIDEO_STORAGE, 2) and CBR (IVIDEO_LOW_DELAY, 1) tries to achieve target bitrate in a given time  duration. CBR is more strict to latency and operating VBR level and will skip frames in order to maintain the HRD compliance. On the other hand, VBR is more flexible and operates on higher buffer size and does not skip frame.

    CVBR which allows the traget bitrate to temporarily shift towards max bitrate based on scene complexity is not supported in DM6467. Its there is other TI devices like DM36x and DM81x.

    regards

    Yashwant

  • Yashwant, 

    Thanks for your response!  Could you clarify one thing:  You say that:

    Yashwant Dutt said:
    operating VBR level and will skip frames in order to maintain the HRD compliance

    however in your next sentence you say:

    Yashwant Dutt said:
    VBR is more flexible and operates on higher buffer size and does not skip frame.

    Does VBR skip frames or does it not?

    When you say it operates on a higher buffer size, how subtle is this?  Is something that I should notice when use the aforementioned "BiteRate Viewer" program.  It does plot at the frame level (no averaging).  Is this something that will be hardly noticeable?

    Thanks,

    Dave



  • Dave,

    Clarifying - 

    1. VBR does not skip frame

    2. the VBV buffer size can be specified by the user, i think maxDelay is the name if the parameter. You can specify that to increase the buffer level.

    regards

    Yashwant