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.

Memory allocation fails for multi-instance

Hi,

I am facing an issue of memory allocation during VIDENC2_Create of third instance (I have 3 instances of 1080i H264 to 1080i H264 transcoders in our system).

The log below suggests that it is hanging in memory allocation. Which memory segment size do I need to increase? Where else should I take care to meet these heap requirements?

I have already tried by increasing the default system heap (For Video M3 in VpsAppMain.cfg) to 3MB, and the MC_HDVICP2_INT_HEAP_CACHED to 56MB

Log:

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

N:Video P:1 #:01476 T:0000000c626f9505 S:OMX_TI_VIDENC_CommandNotifyFromBase::Line 3426::VENC->Before VIDENC2_Create
N:Video P:1 #:01478 T:0000000c6272bf9f S:Calling VIDENC2_create for ivahd_h264enc_2
N:Video P:1 #:01479 T:0000000c62741455 S:Entered Function :omxrpc_skel_usebuffer
N:Video P:1 #:01480 T:0000000c6277886b S:Entered Function :omxrpc_skel_usebuffer
N:Video P:1 #:01481 T:0000000c627af4d9 S:Entered Function :omxrpc_skel_usebuffer
N:Video P:1 #:01482 T:0000000c627ec4a7 S:Entered Function :omxrpc_skel_usebuffer
N:Video P:1 #:01483 T:0000000c6282a8c9 S:Entered Function :omxrpc_skel_allocbuffer
N:Video P:1 #:01484 T:0000000c62843133 S:Module<OMX.TI.DUCATI.VIDENC> Entering<OMX_BASE_DIO_Init> @line<120>
N:Video P:1 #:01485 T:0000000c6284a39d S:Entered: OMX_BASE_DIO_Init (0x9dbfa6e8, 1, OMX.DIO.NONTUNNEL, 0x9dbfa07c)
N:Video P:1 #:01486 T:0000000c62857b21 S:Module<OMX.TI.DUCATI.VIDENC> Leaving<OMX_BASE_DIO_Init> @line<172> with error<0:ErrorNone>
N:Video P:1 #:01487 T:0000000c6285f775 S:Module<OMX.TI.DUCATI.VIDENC> Entering<OMX_BASE_DIO_Open> @line<252>
N:Video P:1 #:01488 T:0000000c628cf139 S:Module<OMX.TI.DUCATI.VIDENC> Leaving<OMX_BASE_DIO_Open> @line<257> with error<0:ErrorNone>
N:Video P:1 #:01490 T:0000000c628ff7f7 S:Entered Function :omxrpc_skel_allocbuffer
N:Video P:1 #:01489 T:0000000c628ee063 S:IRESMAN_TILEDMEMORY_getHandles_Plugin 304
N:Video P:1 #:01491 T:0000000c629274ad S:accessDimension = 0, accessUnit = 1 sizeDim0 = 69376 sizeDim1 = 0 alignment = 32
N:Video P:1 #:01492 T:0000000c629319c9 S:retryMemAlloc Raw memory is requested
N:Video P:1 #:01493 T:0000000c6293659d S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01494 T:0000000c6293b057 S:INFO  >> iresman_AllocDummy Memory_alloc size = 69376 and alignement = 128
N:Video P:1 #:01495 T:0000000c62945087 S:INFO  >> iresman_AllocDummy returned from allocation
N:Video P:1 #:01496 T:0000000c6294a885 S:iresman_AllocDummy Exit
N:Video P:1 #:01497 T:0000000c6294fc29 S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01498 T:0000000c62954385 S:INFO  >> iresman_AllocDummy Memory_alloc size = 40 and alignement = 4
N:Video P:1 #:01499 T:0000000c6295baa1 S:INFO  >> iresman_AllocDummy returned from allocation
N:Video P:1 #:01500 T:0000000c62960c23 S:iresman_AllocDummy Exit
N:Video P:1 #:01501 T:0000000c62967e2f S:IRESMAN_TILEDMEMORY_getHandles_Plugin 304
N:Video P:1 #:01502 T:0000000c6296d3ad S:accessDimension = 0, accessUnit = 1 sizeDim0 = 2048 sizeDim1 = 0 alignment = 32
N:Video P:1 #:01503 T:0000000c629753c3 S:retryMemAlloc Raw memory is requested
N:Video P:1 #:01504 T:0000000c62979abd S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01505 T:0000000c6297e0f1 S:INFO  >> iresman_AllocDummy Memory_alloc size = 2048 and alignement = 128
N:Video P:1 #:01506 T:0000000c62986613 S:INFO  >> iresman_AllocDummy returned from allocation
N:Video P:1 #:01507 T:0000000c6298d5bf S:iresman_AllocDummy Exit
N:Video P:1 #:01508 T:0000000c62991c25 S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01509 T:0000000c629964d9 S:INFO  >> iresman_AllocDummy Memory_alloc size = 40 and alignement = 4
N:Video P:1 #:01510 T:0000000c6299e0d9 S:INFO  >> iresman_AllocDummy returned from allocation
N:Video P:1 #:01511 T:0000000c629a340d S:iresman_AllocDummy Exit
N:Video P:1 #:01512 T:0000000c629a90fb S:IRESMAN_TILEDMEMORY_getHandles_Plugin 304
N:Video P:1 #:01513 T:0000000c629ae551 S:accessDimension = 0, accessUnit = 1 sizeDim0 = 36 sizeDim1 = 0 alignment = 32
N:Video P:1 #:01514 T:0000000c629b675b S:retryMemAlloc Raw memory is requested
N:Video P:1 #:01515 T:0000000c629bab6f S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01516 T:0000000c629bf433 S:INFO  >> iresman_AllocDummy Memory_alloc size = 36 and alignement = 128
N:Video P:1 #:01517 T:0000000c629c7b99 S:INFO  >> iresman_AllocDummy returned from allocation
N:Video P:1 #:01518 T:0000000c629cd0f9 S:iresman_AllocDummy Exit
N:Video P:1 #:01519 T:0000000c629d1a79 S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01520 T:0000000c629d60bf S:INFO  >> iresman_AllocDummy Memory_alloc size = 40 and alignement = 4
N:Video P:1 #:01521 T:0000000c629dd65d S:INFO  >> iresman_AllocDummy returned from allocation
N:Video P:1 #:01522 T:0000000c629e2679 S:iresman_AllocDummy Exit
N:Video P:1 #:01523 T:0000000c629e819d S:IRESMAN_TILEDMEMORY_getHandles_Plugin 304
N:Video P:1 #:01524 T:0000000c629ed51b S:accessDimension = 1, accessUnit = 2 sizeDim0 = 2048 sizeDim1 = 1216 alignment = 32
N:Video P:1 #:01525 T:0000000c629f6221 S:retryMemAlloc Raw memory is requested
N:Video P:1 #:01526 T:0000000c629fa6e1 S:INFO  >> iresman_AllocDummy Entry
N:Video P:1 #:01527 T:0000000c629fef21 S:INFO  >> iresman_AllocDummy Memory_alloc size = 2490368 and alignement = 128

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

Thanks

Karthik

  • Hi Karthik,

    To modify the HDVICP heap, you'd have to  modify the "VIDEO_M3_INT_HEAP_CACHED" section as mentioned in the below wiki-

    http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#Modifying_Memory_Map  (look under Heaps and Shared Regions Configured at Load Time). 

    Note that when trying to increase the size of VIDEO_M3_INT_HEAP_CACHED, the size and start address of other sections may have to be adjusted accordingly.

    Also, please undo the changes that you would have made to any .cfg file.

     

     

     

  • Hi Prashant,

     Increasing VIDEO_M3_INT_HEAP_CACHED worked out for us. We were using an old firmware which was not allowing the updated VIDEO_M3_INT_HEAP_CACHED  size to take effect. This lead to mem alloc failure. Thank you for your quick response. We have another query.

    We require more heap memory. So we placed VPSS_M3_DATA and VIDEO_M3_DATA after 0xA0000000. We observed some performance impact. Any idea what could be the reason for this performace impact? Are these regions cached? If so where can I look to change it?

     

    Thanks and regards

    Kishor

  • Kishor

    512MB from 0xA000000 is made as non-cached regions as HDVPSS requires this section tobe non-cached.

    Do you use DSP in your system? If not, then you could use the DSP memory sections for your use.

    Also, do you use HDVPSS-M3 in your system? Based on that, we can suggest alternatives.

    regards

    Tarakesh.

  • Hi Tarakesh,

    We are using both DSP and HDVPSS-M3 in our system. For now we are consuming a part of LINUX_MEM_1 for VIDEO_M3_DATA and this resolved the issue.

     

    We have another query. Where do we configure CMEM , DSP_ALG_HEAP and IPC_SR_HOST_DSP  base addresses and sizes?

     

    Thanks and regards

    Kishor

  • Kishore,

        Below are the answer to your queries.

        CMEM memory configuration: refer section http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#CMEM_memory

        DSP_ALG_HEAP configuration: Refer file $(EZSDK_INSTALL_DIR)/component-sources/omx_05_02_00_09/packages/ti/omx/build/MemSegmentDefinition.xs as in http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#DSP_for_OMX

        IPC_SR_HOST_DSP configuration: This memory section is used only when remote codec engine is used, so you can ignore this & follow the file $(EZSDK_INSTALL_DIR)/component-sources/omx_05_02_00_09/packages/ti/omx/build/MemSegmentDefinition.xs.

    Best Regards

    Velan

       

  • Velan,

    Thanks for the information regarding CMEM  and IPC_SR_HOST_DSP.

     

    Information regarding DSP_ALG_HEAP  is not very clear. Is it part of DSP section in MemSegmentDefinition.xs?

     

    Best Regards,

    Kishor