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.

Linux/TDA2EXEVM: TDA2EX H264 IDRFrameInterval is not working

Part Number: TDA2EXEVM

Tool/software: Linux

Dear Sirs:

  When using TDA2EXEVM + VISION Board. We use the default parameter from Application and set the IDRFrameInterval=1 try to force the codec to output IDR instead of normal I slice.

  However it is not working.

  staticParams.IDRFrameInterval=1;

  staticParams.maxIntraFrameInterval=60;

staticParams.videnc2Params.maxInterFrameInterval = 1

dynamicParams.videnc2DynamicParams.intraFrameInterval=30

dynamicParams.videnc2DynamicParams.interFrameInterval=1;

  This does not force the H264 codec to output IDR in every 30 or 60 frames in TDA2EXEVM however it does in DM81xx.

  Refer to the post

e2e.ti.com/.../671712

It can output IDR, however when try to modify IDRFrameInterval larger than 4, the codec does not output IDR as it should and the output of is random.

My question is quite simple: How can we output a sequence IDR P P P P P ...... IDR P P P P P ... every 30 or 60 frames in TDA processor?

Regards,

/ckhsu

  • Hello,

    Please set only these parameters with your default settings.

    1. intraFrameInterval=30 or 60 (for 30 or 60 frames).
    2. interFrameInterval=1;
    3. IDRFrameInterval = 1;

    intraFrameInterval is the Interval between two consecutive intra frames.

    Setting IDRFrameInterval = 0, will generate I-frames at intraFrameInterval interval. 

    Setting IDRFrameInterval = 1, will generate IDR-frames (with SPS & PPS) at intraFrameInterval interval. 

    Also you can refer how to generate SPS & PPS with any frame. Refer encoder User guide Appendix B - Control for Configurable NALU

    Latest codec version is 02.00.09.01

  • Dear Sir:
    Before we post this, we ever tried the this set of parameter on the EVM board, and that is not working.
    intraFrameInterval=30 or 60 (for 30 or 60 frames).
    interFrameInterval=1;
    IDRFrameInterval = 1;

    In fact, we read the document, and this does not solve the problem. And the most important, when the intraFrameInterval is larger than 4, everything is not working anymore. Please do use it on the EVM board.

    And the release Processor SDK, did release a 02_01_00_09 library which is inconsistent with the release codec.
    Nomatter PROCESSOR_SDK_VISION_03_03_00_00 or PROCESSOR_SDK_VISION_03_02_00_00, there are 2 lib files in the release codec dir ti_components\codecs\ivahd_h264enc_02_00_09_01_production\packages\ti\sdo\codecs\h264enc\lib the first is h264enc_ti_host.lib and the second is h264enc_ti_host.lib_org.

    Where h264enc_ti_host.lib is 02_01_09_01 and the h264enc_ti_host.lib_org is 02_00_09_01. No matter which one is used, the problem is there that's why I post.

    [HOST] [IPU2 ] 56.200634 s: ENCODE: CH0: H264EncCreated:H264ENC_TI DEV.500.V.H264AVC.E.IVAHD.02.01.09.01 ==> This is h264enc_ti_host.lib. And when testing on h264enc_ti_host.lib_org you can see the output is changed to 02.00.09.01


    And the Appendix B Control for Configurable NALU only specify the NALU composition which does work in setting Intra or inter or StartSeq or EndSeq or IDR. I also have tested it, but this does not help to make the codec to be working when intraFrameInterval is larger than 4.

    And there is an output argument of encode response:
    outArgs->videnc2OutArgs.encodedFrameType
    If you observe this output argument, you can get the output like this:
    1. intraFrameInterval >4 suppose set it 30, it will claim the output is IDR every 30 frames but infact it is not if you put the output to be analyze in H.264 reference JM. The output bits will be 0x00 0x00 0x00 0x01 0x21 ... which is a slice not a IDR slice. And the IDR is output randomly.
    2. When intraFrameInterval <=4 suppose set it 4, it will claim the output is IDR every 4 frames. The output bits has a 0x00 0x00 0x00 0x01 0x25 ... which is a real IDR slice.

    SIMPLY SPEAKING OF THIS ISSUE, when the intraFrameInterval is larger than 4 then everything is not working ANYMORE as setting.

    I skip the testing result on IDRFrameInterval here, because it is the same.

    I really really need TI to spend time on this on the EVM. We test this on Linux/BIOS and the result is same.


    Regards,
    /ckhsu
  • One information for TI:
    We ever tried to use the released H.264 codec inside PROCESSOR_SDK_VISION_03_03_00_00 or PROCESSOR_SDK_VISION_03_02_00_00 on our DM81xx platform. And we are 100% sure the codec should be okay because the codec send out the correct IDR every 30 frames in setting as above on DM81xx platform. Hence our conclusion is that the root cause of the issue is on the TDA/DRA platform but not on the codec.

    Hope we can hear the good news from TI soon.


    Regards,
    /ckhsu

  • Hi,

    You can find the latest codec release version 02.00.09.01 here: 

    Also I see (e2e.ti.com/.../2533012, you are setting rcAlgo = 5; Can you check the behaviour with VBR/CBR? ie rcAlgo = 0 or 1?

    1. What targetBitRate are you setting? 
    2. Can you set interCodingPreset = 0 (Default)
    3. intraCodingPreset = 0 (Default)

    Attaching the standalone configuration settings which is used in DRA7xx. Please share your observation.sample_dra7xx.cfg

  • Hi:
    [HOST] [IPU2 ] 41.900445 s: ENCODE: CH0: H264EncCreated:H264ENC_TI DEV.500.V.H264AVC.E.IVAHD.02.00.09.01

    After download the codec link you paste and replace it with the original codec inside the PSDK, the result are as below, the targetBitRate we used in testing is 8000000 which is 8M:
    0. For our configuration, the situation is still the same.
    1. For the rcAlgo set to IVIDEO_LOW_DELAY, the situation is same.
    2. For the rcAlgo set to IVIDEO_STORAGE, the situation is still identical to the above 2 cases.

    For the DRA7xx cfg, I need time to set it and report to you after finish testing.

    Regards,
    /ckhsu
  • Hi,

    Thanks for the update.

    Can you share all the parameter settings with this latest codec? 

  • Hi Prashanth:
    By direct using the parameters inside attached sample_dra7xx.cfg in the last reply, modify the bitrate/ width/height etc. the codec even can not be created. However, conbining some of our parameters, we can create codec and the Intra and IDR can be set larger than 4. Set it to 30 seems to be working in that configuration. It is not yet confirmed what parameters affect the result, but we now can move forward to dig it deep for the issue.

    Thank you very much for the configuration.

    Regards,
    /ckhsu
  • Hi,

    Nice to know its working now. Thanks for the update and closing the thread.