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.

Error on Open video decoder !!

Hi all,

I try to decode 6 CIF 264 files simultaneously with 6 video threads on DM6467, but when it try to open Vdec2_create() in 6th video thread, it always fail!!

Create 1 to 5 files are ok. (I use 5 video threads to do this.)

My loadmodules.sh:

insmod cmemk.ko phys_start=0x86400000 phys_end=0x8ba00000 pools=6x2097152(for loader),140x144000(for decoder)

I think the memory pools are enough for decode and loader, and I revise the phys_start from 0x8780000 to 0x86400000 to extend the CMEM range.

Is there a restriction on the amount of create video decoder ?

btw, how to adjust the DDRALGHEAP size? which file I have to modify? (my work directory \dvsdk_1_40_02_33\dvsdk_demos_1_40_00_18\dm6467\decode)

 

Thanks !!

 

Tai Chang

 

  • Enabling CE_DEBUG may help identify which resource you're running out of (memory, DMA channels, etc).

    http://tiexpressdsp.com/index.php/CE_DEBUG

    Chris

  • Hi Juan,

    So I only have to revise the "video_copy.tcf" file and make clean;make;make install right ? [:)]

    Update 1:

    I found the file "\dvsdk_1_40_02_33\dm6467_dvsdk_combos_1_17\packages\ti\sdo\servers\decode\decode.tcf" is for my case, right ?

     Update 2:

    Modify decode.tcf file is still not working.

    var mem_ext = [
        // will use for cmem: base: 0x87800000 (120MB offset), size: 0x04200000 (66MB)
    {
        comment:    "DDRALGHEAP: off-chip memory for dynamic algmem allocation",
        name:       "DDRALGHEAP",
        base:       0x8C000000,   // from 0x8BA00000:offset=186MB, to 0x8C000000:offset=192MB
        len:        0x03A00000,   // from 0x04000000=64MB to 0x03A00000=58MB
        space:      "code/data"
    },
    {
        comment:    "DDR2: off-chip memory for code and data",
        name:       "DDR2",
        base:       0x8FA00000,   // 250MB offset
        len:        0x00400000,   // 4MB size
        space:      "code/data"
    },
    {
        comment:    "DSPLINK: off-chip memory for DSPLINK code and data",
        name:       "DSPLINKMEM",
        base:       0x8FE00000,   // 254MB
        len:        0x00100000,   //   1MB
        space:      "code/data"
    },
    {
        comment:    "RESET_VECTOR: off-chip memory for the reset vector table",
        name:       "RESET_VECTOR",
        base:       0x8FF00000,
        len:        0x00000080,
        space:      "code/data"
    },
    ];

    My current memory layout is below:

    Linux: 0 - 100MB

    CMEM:100MB-186MB(wish from 100MB to 192MB or more)

    DDRALGHEAP: 186MB-250MB(wish from 192MB to 250MB)

    Tai

  • Hi Chris,

     

    I have tried the CE_DEBUG=2 ./decode -v ...   and show a lot of mesage, I need to study it up ...

    Thanks

    Tai

     

  • Hi Chris,

     

    I have tried the CE_DEBUG=2 ./decode -v ...   and show a lot of mesage, see below are the thread 4 and 5 ..4 is ok but 5 is fail..

     ===== Video thread[4]: CREATE VIDEO DECODER======  <==== Create the 4th Video decoder here

    @6,501,017us: [+0 T:0x477b7b60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> Enter (engine=0x5dac0, name='h264dec', params=0x477b75b8)

    @6,501,222us: [+0 T:0x477b7b60] CV - VISA_create(0x5dac0, 'h264dec', 0x477b75b8, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    @6,501,408us: [+0 T:0x477b7b60] CV - VISA_create2(0x5dac0, 'h264dec', 0x477b75b8, 0x1c, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    @6,501,626us: [+0 T:0x477b7b60] CE - Engine_createNode(0x5dac0, 'h264dec', 2484, 0x477b75b8, 0x1c, 0x477b73d8)
    @6,573,017us: [+4 T:0x477b7b60] CE - Engine_createNode> created node(stdIn=0x6, stdOut=0x10009, msgq=0x5dce0, algName='h264dec', rms
    Node=0x8fa71a60, algHandle=0x8fa71ad0)
    [DSP] @9,521,277tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x18)
    [DSP] @9,521,331tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71a60)
    [DSP] @9,521,381tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0xa)
    [DSP] @9,521,424tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71a78)
    [DSP] @9,521,476tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x20)
    [DSP] @9,521,524tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71a88)
    [DSP] @9,521,573tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x24)
    [DSP] @9,521,620tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71aa8)
    [DSP] @9,521,677tk: [+0 T:0x8ba0006c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> Enter (engine=0x0, name='h264dec', params=0x8fe0b8c
    0)
    [DSP] @9,521,757tk: [+0 T:0x8ba0006c] CV - VISA_create(0x0, 'h264dec', 0x8fe0b8c0, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    [DSP] @9,521,832tk: [+0 T:0x8ba0006c] CV - VISA_create2(0x0, 'h264dec', 0x8fe0b8c0, 0x1c, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    [DSP] @9,521,928tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x30)
    [DSP] @9,521,974tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71ad0)
    [DSP] @9,522,026tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x8fa6a7a0, idma3Fxns=0x0, params=0x8fe
    0b8c0, attrs=0x8ba03e80)
    [DSP] @9,522,118tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x10)
    [DSP] @9,522,163tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71b00)
    [DSP] @9,683,590tk: [+0 T:0x8ba0006c] ti.sdo.ce.osal.Sem - Sem_create> count 1
    [DSP] @9,683,669tk: [+0 T:0x8ba0006c] ti.sdo.ce.osal.Sem - Sem_create> sem: 0x8dfb71dc
    [DSP] @9,684,537tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x8fa71b00)
    [DSP] @9,684,610tk: [+0 T:0x8ba0006c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> return (0x8fa71ad0)
    [DSP] @9,684,676tk: [+4 T:0x8ba0006c] OT - Thread_create > name: "h264dec#4", pri:  -1, stack size:  13096, stack seg: 0
    @6,577,269us: [+0 T:0x477b7b60] CE - Engine_fwriteTrace> returning count [1934]
    @6,577,436us: [+2 T:0x477b7b60] CE - Engine_createNode> Returning 0x5dcb8
    @6,577,656us: [+5 T:0x477b7b60] CV - VISA_create> remote codec created (name='h264dec', localQueueID=0x10009, remoteQueueID=0x0006)
    @6,577,877us: [+0 T:0x477b7b60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> return (0x5dc80)
    @6,578,040us: [+2 T:0x477b7b60] ti.sdo.dmai - [Vdec2] Video decoder instance created
    @6,578,185us: [+0 T:0x477b7b60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Enter (handle=0x5dc80, id=1, params=0x477b7598 (size=0x1
    c), status=0x477b7430 (size=0xb8)
    @6,578,447us: [+5 T:0x477b7b60] CV - VISA_allocMsg> Allocating message for messageId=0x0006ffd9
    @6,578,619us: [+0 T:0x477b7b60] CV - VISA_call(visa=0x5dc80, msg=0x42ec1880): messageId=0x0006ffd9, command=0x1
    [DSP] @9,699,029tk: [+5 T:0x8f8d4b8c] CN - NODE> 0x8fa71a88(h264dec#4) call(algHandle=0x8fa71ad0, msg=0x8fe0c880); messageId=0x0006f
    fd9
    [DSP] @9,699,130tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Enter (handle=0x8fa71ad0, id=1, params=0x8fe0c8b4
    (size=0x1c), status=0x8fe0c8d0 (size=0xb8)
    [DSP] @9,699,243tk: [+5 T:0x8f8d4b8c] CV - VISA_enter(visa=0x8fa71ad0): algHandle = 0x8fa71b00
    [DSP] @9,699,304tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(handle=0x8fa71b00)
    [DSP] @9,699,495tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> return
    [DSP] @9,699,552tk: [+5 T:0x8f8d4b8c] CV - VISA_exit(visa=0x8fa71ad0): algHandle = 0x8fa71b00
    [DSP] @9,699,612tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(handle=0x8fa71b00)
    [DSP] @9,699,680tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> return
    [DSP] @9,699,732tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Exit (handle=0x8fa71ad0, retVal=0x0)
    [DSP] @9,699,805tk: [+5 T:0x8f8d4b8c] CN - NODE> returned from call(algHandle=0x8fa71ad0, msg=0x8fe0c880); messageId=0x0006ffd9
    @6,915,001us: [+0 T:0x477b7b60] CE - Engine_fwriteTrace> returning count [1151]
    @6,915,174us: [+0 T:0x477b7b60] CV - VISA_call Completed: messageId=0x0006ffd9, command=0x1, return(status=0)
    @6,915,360us: [+5 T:0x477b7b60] CV - VISA_freeMsg(0x5dc80, 0x42ec1880): Freeing message with messageId=0x0006ffd9
    @6,915,541us: [+0 T:0x477b7b60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Exit (handle=0x5dc80, retVal=0x0)
    @6,915,711us: [+2 T:0x477b7b60] ti.sdo.dmai - [Vdec2] Made XDM_SETPARAMS control call
    @6,915,855us: [+0 T:0x477b7b60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Enter (handle=0x5dc80, id=5, params=0x5dc5c (size=0x1c),
     status=0x477b7358 (size=0xb8)
    @6,916,083us: [+5 T:0x477b7b60] CV - VISA_allocMsg> Allocating message for messageId=0x0006ffda
    @6,916,247us: [+0 T:0x477b7b60] CV - VISA_call(visa=0x5dc80, msg=0x42ec1880): messageId=0x0006ffda, command=0x1
    [DSP] @10,482,428tk: [+5 T:0x8f8d4b8c] CN - NODE> 0x8fa71a88(h264dec#4) call(algHandle=0x8fa71ad0, msg=0x8fe0c880); messageId=0x0006
    ffda
    [DSP] @10,482,517tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Enter (handle=0x8fa71ad0, id=5, params=0x8fe0c8b4
     (size=0x1c), status=0x8fe0c8d0 (size=0xb8)
    [DSP] @10,482,626tk: [+5 T:0x8f8d4b8c] CV - VISA_enter(visa=0x8fa71ad0): algHandle = 0x8fa71b00
    [DSP] @10,482,686tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(handle=0x8fa71b00)
    [DSP] @10,482,754tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> return
    [DSP] @10,482,808tk: [+5 T:0x8f8d4b8c] CV - VISA_exit(visa=0x8fa71ad0): algHandle = 0x8fa71b00
    [DSP] @10,482,870tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(handle=0x8fa71b00)
    [DSP] @10,482,937tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> return
    [DSP] @10,482,989tk: [+0 T:0x8f8d4b8c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Exit (handle=0x8fa71ad0, retVal=0x0)
    [DSP] @10,483,060tk: [+5 T:0x8f8d4b8c] CN - NODE> returned from call(algHandle=0x8fa71ad0, msg=0x8fe0c880); messageId=0x0006ffda
    @6,919,284us: [+0 T:0x477b7b60] CE - Engine_fwriteTrace> returning count [1161]
    @6,919,476us: [+0 T:0x477b7b60] CV - VISA_call Completed: messageId=0x0006ffda, command=0x1, return(status=0)
    @6,919,668us: [+5 T:0x477b7b60] CV - VISA_freeMsg(0x5dc80, 0x42ec1880): Freeing message with messageId=0x0006ffda
    @6,919,850us: [+0 T:0x477b7b60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_control> Exit (handle=0x5dc80, retVal=0x0)
    @6,920,065us: [+2 T:0x477b7b60] ti.sdo.dmai - [Vdec2] Made XDM_GETBUFINFO control call
    @6,920,246us: [+2 T:0x477b7b60] ti.sdo.dmai - [BufTab] Allocating BufTab for 1 buffers
    @6,920,532us: [+4 T:0x477b7b60] OM - Memory_contigAlloc> CMEM_alloc(144000) = 0x477b8000.
    @6,920,742us: [+4 T:0x477b7b60] OM - Memory_contigAlloc> CMEM_getPhys(0x477b8000) = 0x8ad4c000.
    @6,920,940us: [+2 T:0x477b7b60] ti.sdo.dmai - [Buffer] Alloc Buffer of size 144000 at 0x477b8000 (0x8ad4c000 phys)
    @6,921,148us: [+2 T:0x477b7b60] ti.sdo.dmai - [Loader] Creating Loader for s5.264 with buffer size 2097152, window size 1048576
    @6,924,273us: [+4 T:0x477b7b60] OM - Memory_contigAlloc> CMEM_alloc(2097152) = 0x477dc000.
    @6,924,495us: [+4 T:0x477b7b60] OM - Memory_contigAlloc> CMEM_getPhys(0x477dc000) = 0x8b000000.
    @6,924,696us: [+2 T:0x477b7b60] ti.sdo.dmai - [Buffer] Alloc Buffer of size 2097152 at 0x477dc000 (0x8b000000 phys)
    @7,257,919us: [+0 T:0x477b7b60] ti.sdo.ce.osal.Sem - Sem_create> count: 0
    @7,258,099us: [+0 T:0x477b7b60] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x5e030]
    @7,258,261us: [+0 T:0x477b7b60] ti.sdo.ce.osal.Sem - Sem_create> count: 1
    @7,258,408us: [+0 T:0x477b7b60] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x5e048]
    @7,258,559us: [+0 T:0x477b7b60] ti.sdo.ce.osal.Sem - Sem_create> count: 0
    @7,258,704us: [+0 T:0x477b7b60] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x5e060]
    @7,259,559us: [+0 T:0x489dbb60] CE - Engine_open> Enter('decode', 0x0, 0x489db4bc)
    @7,259,814us: [+0 T:0x489dbb60] CE - rserverOpen('decodeCombo.x64P'), count = 5
    @7,259,978us: [+0 T:0x489dbb60] CE - rserverOpen('decodeCombo.x64P'): 0x59e78 done.
    @7,266,876us: [+0 T:0x489dbb60] CE - checkServer(0x5e108)
    @7,267,403us: [+0 T:0x489dbb60] CE - Engine_fwriteTrace> returning count [0]
    @7,267,588us: [+0 T:0x489dbb60] CE - Engine_open> return(385288)

     ===== Video thread[5]: CREATE VIDEO DECODER======  <==== Create the 5th Video decoder here


    @7,267,857us: [+0 T:0x489dbb60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> Enter (engine=0x5e108, name='h264dec', params=0x489db5b8)

    @7,268,060us: [+0 T:0x489dbb60] CV - VISA_create(0x5e108, 'h264dec', 0x489db5b8, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    @7,268,251us: [+0 T:0x489dbb60] CV - VISA_create2(0x5e108, 'h264dec', 0x489db5b8, 0x1c, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    @7,268,471us: [+0 T:0x489dbb60] CE - Engine_createNode(0x5e108, 'h264dec', 2484, 0x489db5b8, 0x1c, 0x489db3d8)
    @7,272,189us: [+6 T:0x489dbb60] CE - Engine_createNode> Remote node creation FAILED (0x80008008). <font color=red><======= FAIL HERE !!!!!!!!!</font>
    [DSP] @11,300,704tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x18)
    [DSP] @11,300,758tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71bc8)
    [DSP] @11,300,808tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0xa)
    [DSP] @11,300,852tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71be0)
    [DSP] @11,300,904tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x20)
    [DSP] @11,300,952tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71bf0)
    [DSP] @11,301,001tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x24)
    [DSP] @11,301,048tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71c10)
    [DSP] @11,301,105tk: [+0 T:0x8ba0006c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> Enter (engine=0x0, name='h264dec', params=0x8fe0d8
    c0)
    [DSP] @11,301,184tk: [+0 T:0x8ba0006c] CV - VISA_create(0x0, 'h264dec', 0x8fe0d8c0, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    [DSP] @11,301,259tk: [+0 T:0x8ba0006c] CV - VISA_create2(0x0, 'h264dec', 0x8fe0d8c0, 0x1c, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    [DSP] @11,301,355tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x30)
    [DSP] @11,301,402tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71c38)
    [DSP] @11,301,453tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x8fa6a7a0, idma3Fxns=0x0, params=0x8f
    e0d8c0, attrs=0x8ba03e80)
    [DSP] @11,301,546tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x10)
    [DSP] @11,301,591tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fa71c68)
    [DSP] @11,305,392tk: [+7 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> Algorithm creation FAILED; make sure that 1) alg
    params are correct/appropriate, 2) there is enough internal and external algorithm memory available -- check DSKT2 settings for heap
     assignments and scratch allocation
    [DSP] @11,305,570tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(handle=0x8fa71c68)
    [DSP] @11,305,637tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fa71c68, size=16)
    [DSP] @11,305,699tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1)
    [DSP] @11,305,741tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> return
    [DSP] @11,305,794tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0)
    [DSP] @11,305,850tk: [+2 T:0x8ba0006c] CV - VISA_create> FAILED to create local codec.
    [DSP] @11,305,902tk: [+0 T:0x8ba0006c] CV - VISA_delete(0x8fa71c38)
    [DSP] @11,305,947tk: [+5 T:0x8ba0006c] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    [DSP] @11,306,014tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fa71c38, size=48)
    [DSP] @11,306,069tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1)
    [DSP] @11,306,116tk: [+0 T:0x8ba0006c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> return (0x0)
    [DSP] @11,306,182tk: [+0 T:0x8ba0006c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_delete> Enter (handle=0x0)
    [DSP] @11,306,241tk: [+0 T:0x8ba0006c] CV - VISA_delete(0x0)
    [DSP] @11,306,279tk: [+0 T:0x8ba0006c] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_delete> return
    [DSP] @11,306,335tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fa71c10, size=36)
    [DSP] @11,306,391tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1)
    [DSP] @11,306,433tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fa71bf0, size=32)
    [DSP] @11,306,488tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1)
    [DSP] @11,306,531tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fa71be0, size=10)
    [DSP] @11,306,586tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1)
    [DSP] @11,306,628tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fa71bc8, size=24)
    [DSP] @11,306,683tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1)
    @7,612,708us: [+0 T:0x489dbb60] CE - Engine_fwriteTrace> returning count [3621]
    @7,612,880us: [+2 T:0x489dbb60] CE - Engine_createNode> Returning 0x0
    @7,613,049us: [+2 T:0x489dbb60] CV - VISA_create> FAILED to create remote codec (0x8).
    @7,613,207us: [+0 T:0x489dbb60] CV - VISA_delete(0x5e2c8)
    @7,613,331us: [+5 T:0x489dbb60] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    @7,613,504us: [+0 T:0x489dbb60] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> return (0x0)
    @7,613,660us: [+7 T:0x489dbb60] ti.sdo.dmai - [Vdec2] Failed to open video decode algorithm
    Error:
     video thread: Failed to create video decoder: h264dec


    Tai


     

  • CE_DEBUG=3

     ===== Video thread[4]: CREATE VIDEO DECODER======
    @11,293,726us: [+0 T:0x477b7b60 S:0x477b73dc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> Enter (engine=0x5dac0, name='h264dec', para
    ms=0x477b75b8)
    @11,293,961us: [+0 T:0x477b7b60 S:0x477b73ac] CV - VISA_create(0x5dac0, 'h264dec', 0x477b75b8, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    @11,627,815us: [+0 T:0x477b7b60 S:0x477b72d4] CV - VISA_create2(0x5dac0, 'h264dec', 0x477b75b8, 0x1c, 0x2484, 'ti.sdo.ce.video2.IVID
    DEC2')
    @11,628,096us: [+0 T:0x477b7b60 S:0x477b72bc] OM - Memory_alloc> Enter(0x30)
    @11,628,292us: [+0 T:0x477b7b60 S:0x477b72bc] OM - Memory_alloc> return (0x5dc80)
    @11,628,474us: [+0 T:0x477b7b60 S:0x477b7264] CE - Engine_createNode(0x5dac0, 'h264dec', 2484, 0x477b75b8, 0x1c, 0x477b73d8)
    @11,628,695us: [+0 T:0x477b7b60 S:0x477b724c] OM - Memory_alloc> Enter(0x20)
    @11,628,872us: [+0 T:0x477b7b60 S:0x477b724c] OM - Memory_alloc> return (0x5dcb8)
    @11,629,067us: [+0 T:0x477b7b60 S:0x477b723c] OC - Comm_create> Enter(queueName='gppfromnode_9', queue=0x5dcc0, attrs=0x0)
    @11,629,279us: [+0 T:0x477b7b60 S:0x477b7224] OM - Memory_alloc> Enter(0x4)
    @11,629,455us: [+0 T:0x477b7b60 S:0x477b7224] OM - Memory_alloc> return (0x5dce0)
    @11,629,962us: [+0 T:0x477b7b60 S:0x477b723c] OC - Comm_create> return (0x5dce0)
    @11,630,244us: [+0 T:0x477b7b60 S:0x477b7244] OC - Comm_put> Enter(queue=0x0, msg=0x42ec0880)
    @11,630,492us: [+0 T:0x477b7b60 S:0x477b7244] OC - Comm_put> return (0)
    @11,630,701us: [+0 T:0x477b7b60 S:0x477b723c] OC - Comm_get> Enter(queue=0x10008, msg=0x477b72bc, timeout=-1)
    @11,701,273us: [+0 T:0x477b7b60 S:0x477b723c] OC - Comm_get> MSGQ_Get() status=0x8000, return (0)
    @11,701,505us: [+0 T:0x477b7b60 S:0x477b7244] OC - Comm_put> Enter(queue=0x0, msg=0x42ec0880)
    @11,701,744us: [+0 T:0x477b7b60 S:0x477b7244] OC - Comm_put> return (0)
    @11,701,986us: [+0 T:0x477b7b60 S:0x477b723c] OC - Comm_get> Enter(queue=0x10008, msg=0x477b72bc, timeout=-1)
    @11,702,218us: [+0 T:0x477b7b60 S:0x477b723c] OC - Comm_get> MSGQ_Get() status=0x8000, return (0)
    @11,702,412us: [+4 T:0x477b7b60 S:0x477b7264] CE - Engine_createNode> created node(stdIn=0x6, stdOut=0x10009, msgq=0x5dce0, algName=
    'h264dec', rmsNode=0x8fa71a20, algHandle=0x8fa71a90)
    @11,702,687us: [+0 T:0x477b7b60 S:0x477b71c4] OC - Comm_put> Enter(queue=0x0, msg=0x42ec0880)
    @11,702,914us: [+0 T:0x477b7b60 S:0x477b71c4] OC - Comm_put> return (0)
    @11,703,150us: [+0 T:0x477b7b60 S:0x477b71bc] OC - Comm_get> Enter(queue=0x10008, msg=0x477b7250, timeout=-1)
    @11,703,413us: [+0 T:0x477b7b60 S:0x477b71bc] OC - Comm_get> MSGQ_Get() status=0x8000, return (0)
    [DSP] @19,833,632tk: [+0 T:0x8ba0006c S:0x8ba04024] CR - processRmsCmd(0x8fe0b8a8, 4056): cmd = 0
    [DSP] @19,833,709tk: [+0 T:0x8ba0006c S:0x8ba03f14] OM - Memory_alloc> Enter(size=0x18)
    [DSP] @19,833,770tk: [+0 T:0x8ba0006c S:0x8ba03f14] OM - Memory_alloc> return (0x8fa71a20)

     ===== Video thread[5]: CREATE VIDEO DECODER======
    @13,081,305us: [+0 T:0x489dbb60 S:0x489db3dc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_create> Enter (engine=0x5e108, name='h264dec', para
    ms=0x489db5b8)
    @13,081,541us: [+0 T:0x489dbb60 S:0x489db3ac] CV - VISA_create(0x5e108, 'h264dec', 0x489db5b8, 0x2484, 'ti.sdo.ce.video2.IVIDDEC2')
    @13,414,841us: [+0 T:0x489dbb60 S:0x489db2d4] CV - VISA_create2(0x5e108, 'h264dec', 0x489db5b8, 0x1c, 0x2484, 'ti.sdo.ce.video2.IVID
    DEC2')
    @13,415,139us: [+0 T:0x489dbb60 S:0x489db2bc] OM - Memory_alloc> Enter(0x30)
    @13,415,334us: [+0 T:0x489dbb60 S:0x489db2bc] OM - Memory_alloc> return (0x5e2c8)
    @13,415,515us: [+0 T:0x489dbb60 S:0x489db264] CE - Engine_createNode(0x5e108, 'h264dec', 2484, 0x489db5b8, 0x1c, 0x489db3d8)
    @13,415,734us: [+0 T:0x489dbb60 S:0x489db24c] OM - Memory_alloc> Enter(0x20)
    @13,415,910us: [+0 T:0x489dbb60 S:0x489db24c] OM - Memory_alloc> return (0x5e300)
    @13,416,104us: [+0 T:0x489dbb60 S:0x489db23c] OC - Comm_create> Enter(queueName='gppfromnode_11', queue=0x5e308, attrs=0x0)
    @13,416,314us: [+0 T:0x489dbb60 S:0x489db224] OM - Memory_alloc> Enter(0x4)
    @13,416,489us: [+0 T:0x489dbb60 S:0x489db224] OM - Memory_alloc> return (0x5e328)
    @13,416,996us: [+0 T:0x489dbb60 S:0x489db23c] OC - Comm_create> return (0x5e328)
    @13,417,231us: [+0 T:0x489dbb60 S:0x489db244] OC - Comm_put> Enter(queue=0x0, msg=0x42ec2880)
    @13,417,504us: [+0 T:0x489dbb60 S:0x489db244] OC - Comm_put> return (0)
    @13,417,691us: [+0 T:0x489dbb60 S:0x489db23c] OC - Comm_get> Enter(queue=0x1000a, msg=0x489db2bc, timeout=-1)
    @13,420,419us: [+0 T:0x489dbb60 S:0x489db23c] OC - Comm_get> MSGQ_Get() status=0x8000, return (0)
    @13,420,647us: [+0 T:0x489dbb60 S:0x489db24c] OC - Comm_delete> Enter (comm=0x5e328)
    @13,421,161us: [+0 T:0x489dbb60 S:0x489db224] OM - Memory_free> Enter(0x5e328, 0x4)
    @13,421,393us: [+0 T:0x489dbb60 S:0x489db224] OM - Memory_free> return (0x1)
    @13,421,576us: [+0 T:0x489dbb60 S:0x489db25c] OC - Comm_delete> return
    @13,421,741us: [+0 T:0x489dbb60 S:0x489db23c] OM - Memory_free> Enter(0x5e300, 0x20)
    @13,421,917us: [+0 T:0x489dbb60 S:0x489db23c] OM - Memory_free> return (0x1)
    @13,422,088us: [+6 T:0x489dbb60 S:0x489db264] CE - Engine_createNode> Remote node creation FAILED (0x80008008).
    @13,422,298us: [+0 T:0x489dbb60 S:0x489db1c4] OC - Comm_put> Enter(queue=0x0, msg=0x42ec2880)
    @13,422,533us: [+0 T:0x489dbb60 S:0x489db1c4] OC - Comm_put> return (0)
    @13,422,783us: [+0 T:0x489dbb60 S:0x489db1bc] OC - Comm_get> Enter(queue=0x1000a, msg=0x489db250, timeout=-1)
    @13,423,022us: [+0 T:0x489dbb60 S:0x489db1bc] OC - Comm_get> MSGQ_Get() status=0x8000, return (0)
    [DSP] @23,980,002tk: [+0 T:0x8ba0006c S:0x8ba04024] CR - processRmsCmd(0x8fe0d8a8, 4056): cmd = 0
    [DSP] @23,980,075tk: [+0 T:0x8ba0006c S:0x8ba03f14] OM - Memory_alloc> Enter(size=0x18)
    [DSP] @23,980,136tk: [+0 T:0x8ba0006c S:0x8ba03f14] OM - Memory_alloc> return (0x8fa71b88)

  • I call Engine_getUsedMem() and get below result:

     Video thread[0]: Engine_getUsedMem(Heap memory)=13231504 byets

     Video thread[1]: Engine_getUsedMem(Heap memory)=26407200 byets

     Video thread[2]: Engine_getUsedMem(Heap memory)=39582896 byets

     Video thread[3]: Engine_getUsedMem(Heap memory)=52758592 byets

     Video thread[4]: Engine_getUsedMem(Heap memory)=65934288 byets

    Does this mean it has already consume 65934288 byets for decode 5 CIF files ?

    So if the 6th file dcode executed, totally 79109984 byets is necessary and will exceed the whole Heap memory size !!!

    I wonder this caused the "Error on Open video decoder !! "

    ==== Update: ======

    I found the article: http://wiki.davincidsp.com/index.php/DDRALGHEAP

    It says: If the ARM-side only needs video decoding to run at quarter resolution, and specifies that at VIDDEC_create() time, that instance will require less memory from DDRALGHEAP than if it wants the video decoder to run at full resolution.

    BUT, no matter what HD, D1 or CIF file to decode, the DSP side always need 13231504 byets for decode usage !!!! Why ?

    It does not make any sense !!!

     

    Please correct me if I am wrong.

    Tai