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.

transplantation of x264 on dm6467,enqueue memTab failed.

    I am working on the transplantation of x264 on  the TI's dm6467 platform. However, when I run the executable, the algorithm can't be created.    

    Here is the error info :

    [DSP] @0,185,433tk: [+7 T:0x85a00784 S:0x8792637c] 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。

    Frome the detail trace info, I can see that the problem lies in the alloc of memTab in func VIDENCCOPY_TI_alloc. The number of memTab In the algorithm is  53.

    At the beginning, I set the memTab[52] to 0, which leads to the result that the first 51 times of memTab allocating is successful but a error occur in the following allocation. The error info shows blow:

       ti.sdo.fc.dskt2 - _DSKT2_assignInstanceMemory> Exit

(returnVal=0)

    [DSP] @0,185,238tk: [+7 T:0x85a00784 S:0x879262e4] ti.sdo.fc.dskt2 - DSKT2_createAlg3>

Instance memory allocation failed

    [DSP] @0,185,307tk: [+2 T:0x85a00784 S:0x879262e4] ti.sdo.fc.dskt2 - DSKT2_createAlg3>

memTab memory freed from 0x879274f8, size=80

 

        If I set the memTab[52] to a normal value , the DSP will crash after running a while .

        In order to do more tests, I do little modification each time on the original algorithm provided by TI named videnc1_copy. When the number of memTab is less than 4, there is no error. On the contrary, a "enqueue memTab failed" error or crash will occur when allocating more than 4 memTab.

        The environment of my experiment is :

        DDR 128M.

       dvsdk_2_00_00_22

       codec_engine_2_23_01

       bios_5_33_03.

      Thank you for your attention. I hope I could got your help. If necessary, I can provide the *.tcf and *.cfg or other detail debug information for you .

  • Just a guess because of your comment that 'When the number of memTab is less than 4, there is no error'...

    Are you assigning (and implementing!) an appropriate IALG_Fxns->algNumAlloc() function?  That function simply returns the worst case number of memTabs - in your case, perhaps it should return 53(?).

    If your alg doesn't implement this IALG_Fxns->algNumAlloc() fxn (i.e., if your alg's IALG_Fxns->algNumAlloc() fxn ptr is NULL), XDAIS defines that IALG_DEFMEMRECS (4) will be the max memTabs the alg will request.  This is what the simple videnc1_copy does - it assigns its IALG_Fxns->algNumAlloc() fxn to NULL, and therefore relies on the XDAIS default of 4.  If you need more than 4 memTabs, make sure you're implementing IALG_Fxns->algNumAlloc().

    Chris

  • Thank you very much, we  followed  your guide and solve the problem !!!! Thank you very very much...

    I am very sorry that i didn't reply to you immediately, but I  went through such a busy period that……I am really sorry……