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.

OMAP4 Blaze tablet 2( Encoder/Decoder)

Other Parts Discussed in Thread: 4460, SYSBIOS

Hello,

This is the configuartion I am using:-

Android Release:- IcecreamSandwich 4.0.4 (MR1.1)

Profile:-BaseLine

Resolution: -1080p(Encoder+Decoder)

Board:-Blaze tablet 2(OMAP4460 platform

When I make video call from Blaze to Video conferencing endpoint ,it works fine for 5 hours ,

but when call is disconnected in between and again call is made, after such 3-4th trial ,I found either encoder/decoder hangs(does not start).

I found Memory Leak in Ducati binary,our application also fails to allocate memory to OMX buffer after 3-4th trial.

Could anybody let me know,does this memory leak error occurs when system works fine ? Is there any limitation

of memory on OMAP 4460 platform ?

Following is snippet of Ducati log :-

[CORE1]: [   3197.315] [ERR=94703] src/OMX_H264VideoEncoder.c:[1406]:[Instance 1]:input port buff actual =3

[CORE1]: [   3197.323] [ERR=94704] src/OMX_H264VideoEncoder.c:[4299]:Memory leak detected. Bytes lost = 1264

[CORE1]: [   3197.323] [ERR=94705] src/OMX_H264VideoEncoder.c:[4300]: Value from GetMemCounter = 4096

[CORE1]: [   3197.323] [ERR=94706] src/OMX_H264VideoEncoder.c:[4301]: Value from GetMemUsage = 89269640

[CORE1]: [   3197.323] [ERR=94707] src/OMX_H264VideoEncoder.c:[4304]:Total size = 6291456

[CORE1]: [   3197.324] [ERR=94708] src/OMX_H264VideoEncoder.c:[4305]:Total free size = 4000280

[CORE1]: [   3197.324] [ERR=94709] src/OMX_H264VideoEncoder.c:[4306]:Largest Free size = 3996616

[CORE1]: [   3197.324] [ERR=94710] src/OMX_H264VideoEncoder.c:[4307]:

[CORE1]: [   3197.587] xdc.runtime.Memory: line 52: out of memory: heap=0x85a1f418, size=3303172

[CORE1]: [   3197.587] Depreciated API: ERROR: bios6/src/timm_osal_memory.c:[324]:Memory Allocation failed!!!

[CORE1]: [   3197.588] [ERR=94740] memutils.c:[46]:

[CORE1]: [   3197.588] Error: No mapping available for this region for Addr = 219900

[CORE1]: [   3197.588]

[CORE1]: [   3197.588] [ERR=94741] src/msp_video.c:[2495]:Warning: Pipe processing is slower than the requested framerate!!!

[   3204.126] [ERR=94781] src/omx_iss_cam.c:[1213]:Memory leak detected. Bytes lost = 10972010

[CORE1]: [   3204.126] [ERR=94782] src/omx_iss_cam.c:[1214]: Value from GetMemCounter = 276

[CORE1]: [   3204.126] [ERR=94783] src/omx_iss_cam.c:[1215]: Value from GetMemUsage = 11106358

[CORE1]: [   3204.126] [ERR=94784] src/omx_iss_cam.c:[1218]:Total size = 6291456

[CORE1]: [   3204.126] [ERR=94785] src/omx_iss_cam.c:[1219]:Total free size = 5980328

[CORE1]: [   3204.126] [ERR=94786] src/omx_iss_cam.c:[1220]:Largest Free size = 3872384

[CORE1]: [   3204.126] [ERR=94787] src/omx_iss_cam.c:[1221]:

[CORE1]: [   3204.127] [ERR=94788] src/omx_iss_cam.c:[1222]:-----------------------------------------------

[CORE1]: [   3204.127] [ERR=94789] src/omx_iss_cam.c:[1223]:

[CORE1]: [   3228.877] [ERR=95491] omx_videodec_common/src/omx_video_decoder.c:[2862]:Memory leak detected. Bytes lost = -143

[CORE1]: [   3206.143] [ERR=94847] omx_videodec_common/src/omx_video_decoder.c:[2863]: Value from GetMemCounter = 57

[CORE1]: [   3206.143] [ERR=94848] omx_videodec_common/src/omx_video_decoder.c:[2864]: Value from GetMemUsage = 14644

[CORE1]: [   3206.143] [ERR=94849] omx_videodec_common/src/omx_video_decoder.c:[2867]:Total size = 6291456

[CORE1]: [   3206.144] [ERR=94850] omx_videodec_common/src/omx_video_decoder.c:[2868]:Total free size = 6220064

[CORE1]: [   3206.144] [ERR=94851] omx_videodec_common/src/omx_video_decoder.c:[2869]:Largest Free size = 4194744

[CORE1]: [   3206.144] [ERR=94852] omx_videodec_common/src/omx_video_decoder.c:[2870]:

Sulekha

  • The memory leaks prints when using 2 or more components doesn't reflect a real memory leak, it is part of initial code that was when running only one component, for multiple components like when running Camera and Video Encoder where state changes are mixed those prints are not reflecting a real memory leak.

    Can you say more about the test case? are you using Stagefright? or a custom application base in DOMX? used release is 4AI1.7 or 4AI1.4?

    This information is to know if there could be some way that come buffers and native surface buffers are not being freed by the application or similar error. Could you share some log?

  • Thanks for your response.

    Values(in bytes) printed in this memory leak keep differing

    starting from small value to some maximum and then again starts from small

    value,namely in camera module (omx_iss_cam.c file),encoder module(OMX_H264VideoEncoder.c file),

    and decoder module(omx_video_decoder.c). A part from memory leak log in ducati bin, we are getting following "Out

    of Memory " print  also resulting in Memory allocation failue in ducati bin:-

    [CORE1]: [   3226.496] ti.sysbios.heaps.HeapMem: line 296: out of memory: handle=0x80420224, size=2359332
    3226.496] ti.sysbios.heaps.HeapMem: line 296: out of memory: handle=0x80420224, size=2359332
    [CORE1]: [   3226.496] Depreciated API: ERROR: bios6/src/timm_osal_memory.c:[324]:Memory Allocation failed!!!

    Android Release:- 4AI.1.4

    It is Custom application.

    Use Case:- After ending video call from Blaze to video end point and then again starting

    the call, after 3rd trial ,encoder or decoder stops working.

    Following is error in adb logcat.
    “Error in DCC Init” from DOMX framework,

    followed by error in hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c.

    Please give your suggestion.I am sending snippet of adb log as follows:-

    In between the log we r getting “Error in DCC Init” from DOMX framework
    D/DOMX ( 128): hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:1444 __PROXY_SetConfig()
    D/DOMX ( 128): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001005 - Error returned from OMX API in ducati
    E/CameraHal( 128): (ef32b0) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXAlgo.cpp:1153 setVFramerate - Error while setting VFR min = 5, max = 27, error = 0x80001005
    D/DOMX ( 128): hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:1444 __PROXY_SetConfig()
    D/DOMX ( 128): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001005 - Error returned from OMX API in ducati
    E/CameraHal( 128): (ef32b0) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXAlgo.cpp:1153 setVFramerate - Error while setting VFR min = 5, max = 27, error = 0x80001005
    D/DOMX ( 128): hardware/ti/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c:214 Camera_SendCommand()
    D/DOMX ( 128): ERROR: Error in DCC Init


    /DOMX ( 128): hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:992 PROXY_UseBuffer()
    D/DOMX ( 128): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001018 - Error returned from OMX API in ducati
    D/DOMX ( 128): hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:703 PROXY_AllocateBuffer()
    D/DOMX ( 128): ERROR: PROXY_UseBuffer in PROXY_AllocateBuffer failed with error -2147479528 (0x80001018)
    E/OMXNodeInstance( 128): OMX_AllocateBuffer failed with error -2147479528 (0x80001018)
    E/PlcmOMXCodec( 635): allocate_buffer_with_backup failed



    Thanks in advance.

    Sulekha

  • Sulekha,

    Sorry for the delay in the answer.

    If it is a Custom application it is not possible to support it, since it could be difficult to know if you are using the same code and sequences that for example VTC application.

    Trying to find what is wrong could take long time since it could be a thread issue, a incorrect sequence, incorrect values, not setting correct port index, not using hardware/ti/domx/include as DOMX include directory ( this could lead to incorrect indexes, other directory is inside omap4xxx/domx/include that is used for other purposes)  and other possible issues. And other issue could be that your approach is not DOMX it is IOMX just below Stagefright, VTC uses IOMX.

    About the error you are seeing, DCC could be harmless, the framerate check in VTC code how it is done there are some values that needs to be set before in order to accept it, about buffer allocation compare code in next link to see if it is the same, there is a flag that is added to indicate buffer type of native or not.

    But we have a VTC application code that is functional that must help you to check if the state transitions are correct, and what values are used for OMX_UseBuffer and how to allocate Native buffers and when to free them, between other stuffs.

    Post related to VTC application code

    http://e2e.ti.com/support/omap/f/849/p/197672/705258.aspx#705258

    http://e2e.ti.com/support/omap/f/849/p/178679/661450.aspx#661450

    port reconfiguration issues

    http://e2e.ti.com/support/omap/f/849/p/210475/747744.aspx#747744

    This is one post with similar issues about AllocateBuffer

    http://e2e.ti.com/support/omap/f/849/p/192654/689896.aspx

  • Thanks for your reply.

    Could you please answer my following query,so that I can find root cause of the problem.

    1) When do we get following error :D/DOMX    (  126): hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:529    PROXY_EmptyThisBuffer()    
    D/DOMX    (  126): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001005 - Error returned from OMX API in ducati

    2)what is exact difference between DOMX and IOMX ? as you said "And other issue could be that your approach is not DOMX it is IOMX just below Stagefright, VTC uses IOMX."What issues can be caused by this ?

    3)when do we get following error:

    hardware/ti/domx/domx/omx_proxy_common/src/omx_proxy_common.c:703 PROXY_AllocateBuffer()

    D/DOMX ( 128): ERROR: PROXY_UseBuffer in PROXY_AllocateBuffer failed with error -2147479528 (0x80001018)

    E/OMXNodeInstance( 128): OMX_AllocateBuffer failed with error -2147479528 (0x80001018)

    E/PlcmOMXCodec( 635): allocate_buffer_with_backup failed

    Thanks in advance.

    Sulekha

  • For 1)

    By checking the code it is trying to allocate memory for Buffer Mark procedure, can you confirm that is the case? code block starts with hMarkTargetComponent check then there is a check for marked component to be correct or not, if this is the case and you are not using buffer mark you need to set those buffer header pointers to zero. For allocation line it has a specific Malloc failed message that seems not present from your log.

    For 2)

    The difference between DOMX and IOMX, DOMX is the standard OpenMax IL specification, where you load the OMX_Core library and access the functions by the spec. IOMX is a interface provided by Android FS to access DOMX, this library is used by Stagefright.

    For 3)

    From OpenMax specification 1.0, this table is not in later versions of the file, it indicates that you are calling buffer allocation at an incorrect state.

    http://www.khronos.org/files/openmax_il_spec_1_0.pdf

    page 43,

    OMX_ErrorIncorrectStateOperation = 0x80001018