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.

h264fhdvenc can only reach 10 fps

Hi,all

     The parameters are set as bellow:

    VIDENC1_DynamicParams   dynParams    = Venc1_DynamicParams_DEFAULT;

    VIDENC1_Params         params = Venc1_Params_DEFAULT;

    params.maxWidth          = 1920;
    params.maxHeight         = 1088;
    params.inputChromaFormat = XDM_YUV_420SP;
    params.reconChromaFormat = XDM_CHROMA_NA;
    params.rateControlPreset = IVIDEO_LOW_DELAY;
    params.maxBitRate        = 20000000;
    params.dataEndianness        = XDM_LE_32;
    dynParams.targetBitRate = params.maxBitRate;
    dynParams.inputWidth    = params.maxWidth;
    dynParams.inputHeight   = params.maxHeight;

Can anyone figure out the problem. Why the speed can't reach 30 frames per second as its document said.

Regards,

David

  • And I have to use another codec write by mysel at the same time which also use L2 cache .Would this cause some cache corruption?

    thanks

  • Can you kindly provide us the version of the codec being used? Can you as well check at a lower bit-rate?

  • hi,

         Thanks for your reply .

          Did you mean params.maxBitRate        = 20000000 is too big. I will try as you suggested.

    regards,

    david

  • Hi

        I have tried different bitrate ,but the speed is still near 10 fps.

       Can someone from TI  provide more useful suggestion.It's very important to me.Wating for your help.

    regards,

    David

  • Hi,

           The performance of the h264fhdvenc encoder is dependent on the code placement & cache configuration. Can you kindly verify the following?

    1. Is the 64KB of L2 memory configured as cache?

    2. L1p & d  memory is configured as 32KB  cache.

    3. Have you modified the code placement for the encoder library? Need to review your linker file

    Can you also please let us know if you have the library release or modified the source code release?

  • Hi,Girish

         Thanks for your sincerely help.

    Best regards,

    David

  • HiGirish

        I face a new problem ,the outBufSize I get  is 2088960=1920*1088.It seems too big.The way I get the outBufSize is posted below:

         hVe1 = Venc1_create(ce, "h264fhdvenc", &params, &dynParams);

        outBufSize = Venc1_getOutBufSize(hVe1);

       Can you help to analyse ,where the problem may be.

    Regars,

    David

  • Hi David,

    I don't understand why it's a problem ? You can't know before encoding the size of the encoded frame so you have to allocate enough memory space to be sure you will push in the encoded frame so :

    When you do that :

    outBufSize = Venc1_getOutBufSize(hVe1)

    after you may call a memory allocator of this size like :

            videnc1->hOutBufTab = gst_tidmaibuftab_new(3,

                    outBufSize, BufferGfx_getBufferAttrs (&gfxAttrsOut));

    But after you can create a buffer after encoding process with :

    *outBuf = gst_buffer_new_and_alloc(Buffer_getNumBytesUsed(videnc1->hEncOutBuf));

    and outBuf will be of the size of the encoded frame. (it's the code from TIVidenc1.c from gstreamer TI)

    If it's not helping you , please give more info about your "problem".

    Mika

  • Hi,Mike

         The problem has been solved .Thanks for your help.

    Regards,

    David

  • David, Can you confirm that your original query related to performance is resolved?

  • Yes,when I only run h264 codec .The speed is 30 fps.

    And I have to use another codec writed by myself at the same time which also use L2 cache .It  cause some cache corruption.

    Engine_createNode> Remote node creation FAILED (0x80008008).//hVe1 = Venc1_create(ce, "h264fhdvenc", &params, &dynParams);

    MY own codec need use 60KB L2 cache.I wonder if the two codecs can run together in one application.

    Regards,

    David

  • If you're resource constrained, this may help you understand how codecs can share resources:

    http://processors.wiki.ti.com/index.php/Codec_Engine_GroupIds

    Sharing resources may impose other constraints you may not be willing to accept (e.g. swapping context in/out may introduce new overheads), but wanted to make you aware of the option.

    Chris

  • Hi, Chris

          First ,sorry for so late reply .

    I set my server.tcf according the cs2dm6467 "CS" demo like below:

    /* Specify the L2 memory setting */
    var device_regs = {
        l1PMode: "32k",
        l1DMode: "32k",
        l2Mode: "64k"
    };

    ...

    if (config.hasReportedError == false) {

    bios.MEM.instance("IRAM").createHeap = 1;
    bios.MEM.instance("IRAM").heapSize = 0x00010000;//0x00008000;//0x8f18;// 0x00010000;
    bios.MEM.instance("IRAM").enableHeapLabel = 1;
    bios.MEM.instance("IRAM").heapLabel = prog.extern("IRAM_HEAP", "asm");
       prog.gen();
    }

    Now the h264 codec can work correctly. But my own codec "video_copy" which also need "64K" L2 memmory can't work.

    The "video_copy" codec asks for L2 cache in "link.cmd " like below:

    SECTIONS

    {

    .video_copy:     >   CACHE_L2

    }

    when I run the program on dm6467t board .It gives no error information ,just stucked.I must reset the board.

    Can you help figure out where the problem may be.

    Regards,

    David.