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.

IPNC RDK 3.5 H.264 HF-VBR(CVBR) Rate Control Mode Settting

Hi,

We are working on DM8127 platform and using IPNC RDK 3.5

H.264 codec version : 02.00.04.01

We are looking to set HF-VBR ( CVBR ) mode for H.264 codec.

  • it is required to set rcalgo, maxBitRate, VBRDuration & VBRSensitivity as per Encoder User
    Guide(Appendix N - H264_Encoder_HDVICP2_UserGuide.pdf – SPRUHG3).
  • We haven't found system link control command to set maxBitRate dynamically at run time from application.
  • We have tried following setting to set HF-VBR(CVBR) mode.

            Params                Syslink control Command

            Rate  Control     - ENC_LINK_CMD_SET_CODEC_RATECONTROL

            Bitrate               - ENC_LINK_CMD_SET_CODEC_BITRATE

           VBRSensitivity -   ENC_LINK_CMD_SET_CODEC_VBRS

            VBRDuration   - ENC_LINK_CMD_SET_CODEC_VBRD

            parameter values set as per below

          rate control = 2  , BitRate=<inputBitRate> , VBRDuration = 8 (default value), VBRSensitivity = 4(range 0 -8)

          Does this settings are correct for setting HF-VBR(CVBR) rate control mode ? Does any other parameter required to set ?

          If settings are correct than what will be value of maxBitRate value set at Encoder?

          We have tried above settings and found that if we set BitRate as 2 Mbps then for complex scene BitRate gone up to 4 Mbps and like that for 6 Mbps it has gone up to 8 Mbps. BitRate observed on VLC. 

Thank,

Rachit

 

  • Hello,

    I am not familiar with IPNC.

    I notified the IPNC team for help also.

    Rachit Shah said:
              If settings are correct than what will be value of maxBitRate value set at Encoder?

    The maxBitrate should be at least 1.5 times the targetBitrate.

    maxBitRate >= (1.5 x targetBitRate )

    VBRDuration is the time interval (in seconds) during which encoder collects statistics related to the complexity of the video to vary the instantaneous bitrate. If VBRDuration is not set and only maxBitrate value is set to a value that is atleast 1.5 times the target bit rate then VBRDuration is taken by the encoder to be 8sec.

    VBRSensitivit takes value from 0 to 8. A lower value signifies that maxBitrate will be used for very complex scene, in case complexity increase is not high, HF-VBR will choose a bitrate between target bitrate and maxBitrate.

    Best Regards,

    Margarita


  • Hi,

    We are looking to set CVBR setting for DM8127 platform same as done for DM368 platform.

    Please find below details about CVBR setting done on DM368 platform, H.264 codec version :2.30.00.02.

    rcalgo = 3

    targetBitRate = <inputBitRate>

    maxBitRateCVBR = <1.5 * targetBitRate>

    CVBRsensitivity = 4

    maxHighCmpxIntCVBR = 0

    rcQMin = 10

    rcQMax = 48

    rcQMinI = 10

    rcQMaxI = 44

    and apply VIDENC1_control API with XDM_SETPRMS command at runtime to set CVBR mode dynamically.

     

    Thanks,

    Rachit

  • Hello Rachit,

    The parameters mentioned above are dynamic parameters in case of the latter platform and hence can be set by control call using VIDENC1_control API with XDM_SETPRMS command.

    In case of DM8127, the parameter maxBitRate is a static / create time parameter and hence need to be set at the encoder creation time itself and cannot be changed dynamically.

    With this, the major conditions that need to be met for encoder to choose CVBR are

    1. rcAlgo = 0 (VBR Mode)

    2. maxBitRate >= (1.5 * targetBitRate)

    Regards,

    Nandu.

  • Hi Rachit,

    I'm seeing the same problem with maxBitRate not being applied in CVBR mode for complex scene change. See thread http://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/t/365528.aspx.

    Did you get maxBitRate to work as expected?

    Regards,

    William.