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.

H264 codec without internal memory allocation for DM6437

Hi,

My name is Guy.

We are running video analitycs for the DM6437. We also need to activate TI H264 encoder.

Due to the application needs we are lack of internal memory resources to be used for SRAM for the H264 encoder.

I tried to activate the H264 encoder with DDR allocations olny (Knowing that performance would be degregated), however the process function of the encoder stucks.

Allocating 63.25Kbytes memory from L1 (for test only), as the encoder requests, works fine.

 

My qyuestion is:

Is there a possibility to work with TI video codecs (H264 in this case) without allocating memory from internal memory.

Thanks in advance,

Guy.

 

  • Hi Guy,

    Ideally, mapping of L1 D memory section to ERAM should work fine. 

    Kindly request  you to provide info for the following:

    (1)version number of H.264 Encoder release used

    (2)Have you made proper changes in the cmd file for mapping internal memory sections to external memory?

    (3)Is it getting stuck for the first process call itself?

    We will be able to get back to you with more details once we have above info.

    Thanks,

    Roopesh

  • 6648.DSPManager_700MHz.txtHi,

    Thank you for your reply,

    I know that if I will not use L1 memory for the encoder, only the DDR I will have degredation in performance. I need to check if this degredation is acceptable or not.

    As for your questions:

    1. H264 encoder version is v1.12.

    2. First of all I attached the CMD file (In txt extention cause cmd extension attachemnt is forbidden). Second, I think I made the proper adjacetments.

    No section in my cmd file, that is related to the H264 encoder, is placed in L1. During dynamic allocation process, the encoder asks me to give hime 63.25KBytes from internal memory. When the address I supply is not from internal memory, then the process function which would follow, stucks.

    3. Yes, the process function is stucked on the first call.

    Thanks again, Guy.

  • Hi Guy,

    Thanks for the info.

    But we see from cmd file attached that .text section is pointing to MPEG4 Encoder and not H.264 encoder. Please confirm which codec you are trying to work with.

    Secondly, please specify what's the base address that's used for L1DSRAM, L2DSRAM and ERAM. Also, please attach the original cmd file which runs without any problem.

    Thanks,

    Roopesh

     

  • Hi,

    Our application can run both MPEG4 and H264 codecs (Not simultaniously of course).

    This is why you see some sections that are related to the MPEG4.

    As for the H264, no special changes were made in the cmd file to run the codec, only including the H264 library.

    The cmd file I sent you is the original cmd file.

    Another input: I made the same test for the MPEG4 codec (Tried to run it from the DDR). The result is the same: The codec stucks on the first call to process function.

    That is why I do not think it is a H264 codec only problem. I think that all the video codecs in the da vinci platform have problem to run with DDR2 only.

    AS for the memory adressess:

    L1DSRAM - address 0x10f04000, length 0x00012000 

    L2DSRAM - address 0x10800000, length 0x00010000

    External memory: address 0x80000000, length 128Mbyte.

    Hope this answers your questions.

    Thanks again

      Guy.

  • Hi Guy,

    Thanks for the info. I guess you have mentioned the default address mapping of both L1DSRAM and L2SRAM in the above reply.Can you please specify what's the mapping address that you have specified for L1DSRAM and L2DSRAM to run the codecs now? i.e. starting address and length of both of them in External memory that's mapped by you.

    Thanks,

    Roopesh

     

  • Hi Roopesh,

    In the codec initialization process, we call the algAlloc function of the codec (from the fxn function tables).

    This function retreives the desired memory sections and length, for both internal and external memory.

    For the internal memory, the rH264 requires several sections from external memory and 63.25KBytes from internal memory (It does not care if the memory comes frmo L1 or L2).

    The L1D address for the codec is 0x10F04A00 and the size is 64768 bytes. This works fine. L2 is not used (TI errate recommends to use L2 entirely as cache).

    Replacing this section addres with an address from DDR2 causes the H264 codec to stuck in its process function.

    Thanks, Guy.

  • Hi Guy,

    We understand the problem area. Kindly request you to share the address allocations of L1 and L2 in external memory when it gets stuck. We want to confirm if this mapping is done properly.

    Thanks,

    Roopesh

  • 3660.MapFileZipped.zip

    Hi Roopesh

    If I understand correctly, according to the map file the L1DSRAM symbol is located at  83780e14 and L2DSRAM is allocated to  83780e18

    See attached map file(Zipped).

    Hope this is what you meant.

    Thanks, Guy.

     

  • Hi Guy,

    Thanks. This is what we were looking for. Currently for L1, configuration is :

            name                origin           length          used         unused        attr    

    L1DSRAM               10f04000   00012000  00012000  00000000  RWIX
    CACHE_L1D          10f16000   00002000  00000000  00002000  RWIX

    Please map base address of L1 to external memory as:

            name                 origin           length         used          unused        attr   

    L1DSRAM               837867A0   00012000  00012000  00000000  RWIX 
    CACHE_L1D          837987A0   00002000  00000000  00002000  RWIX

    Please try with above configuration and let us know.

    The L1DSRAM symbol that you are referring to might be some macro defined in code. To get the proper symbol please refer to _L1DSRAM_base symbol.

    Thanks,

    Roopesh

     

  • Hi Roopesh,

    Sorry for the delay.

    I did what you prorposed,

    Still the alg->process() function of the video codec stucks at the first call to it, even after chaging the memory settings.

    Please advice.

    Thanks, Guy.

  • Hi Guy,

    Please share the map file generated after these modifications.

     

    Thanks,

    Roopesh

  • 4353.mapping.txt

    Hi,

    See attached file.

    Thanks, Guy.

     

  • Hi Guy,

    Can you please configure entire L1D(i.e. 80K byte) as mapped memory and check?i.e no part of L1D is configured as cache this way.

             name                  origin           length            used              unused            attr   
    ----------------------        --------           ---------           --------             --------               ----
           L1DSRAM          837867A0   00014000     00014000      00000000      RWIX

     

    Also, in test application, please set L1D cache size as 0KB in TestApp_EnableCache() call (i.e. size.l1dsize = BCACHE_L1_0K).

    ------------------------------------------------------------------------------------------------------------

    PS:Please click on 'Verified answer' button if my response answers your query.

    ----------------------------------------------------------------------------------------------------------

    Thanks,

    Roopesh

  • 4657.MAP_FILE.txt

    Hi Roopesh

    I tried what you asked (NO L1D cache), see attached map file, still the process function stucks at the first call.

    Again, the same setup, if I give the encoder a real address from internal memory (0x10F04000), the process function ios not stucked.

    Did you try this over your station?

    I am getting the impresion that it is impossible to work with the codec without phisycal internal memory addresses? Am I right?

    Thanks, Guy.

  • Hi Guy,

    We are verifying the same at our end. We will let you know if we face the same issue at our end as well.

    Thanks,

    Roopesh

  • Hi Guy,

    It's not possible to map entire L1D to external memory as the codec expects QDMA structure parameters to be in L1D always. If not it can result in hang as seen now.

    Thanks,

    Roopesh