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.

DSKT2_createAlg3 algAlloc returns numRecs=0

Other Parts Discussed in Thread: DM3730, OMAP3530

I have a DM3730 system, running dvsdk 4.03.00.06 components, but with a 3.5.7 kernel.  I used meta-ti recipes as a basis and updated them to support ti-codecs-omap3530_4_02_00_00, codec engine 2_26_02_11, dmai 2_20_00_15, dsplink 1.65.01.05, gstreamer-ti svnr962, linuxutils 2.26.02.05.

I'm trying a simple pipeline: gst-launch -v videotestsrc num-buffers=5 ! 'video/x-raw-yuv, format=(fourcc)UYVY, width=(int)640, height=(int)480' ! TIVidenc1 codecName=h264enc engineName=codecServer ! fakesink

But, I get a failure creating the codec, which I don't understand.  I believe the relevant section is below.  It looks like "Num memory recs requested 214" and "algAlloc returned numRecs=0".  

This is an excerpt.  Full log attached as a separate file.

4442.full.txt

[DSP] @0,125,230tk: [+0 T:0x87c32b54 S:0x87c3699c] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> Enter (engine=0x0, name='h264enc', params=0x859048c0)
[DSP] @0,125,329tk: [+0 T:0x87c32b54 S:0x87c36964] CV - VISA_create(0x0, 'h264enc', 0x859048c0, 0x520, 'ti.sdo.ce.video1.IVIDENC1')
[DSP] @0,125,401tk: [+0 T:0x87c32b54 S:0x87c36844] CV - VISA_create2(0x0, 'h264enc', 0x859048c0, 0x30, 0x520, 'ti.sdo.ce.video1.IVIDENC1')
[DSP] @0,125,486tk: [+0 T:0x87c32b54 S:0x87c367dc] CE - Engine_open> Enter('local', 0x87c3682c, 0x859048c0)
[DSP] @0,125,549tk: [+0 T:0x87c32b54 S:0x87c367bc] OM - Memory_alloc> Enter(size=0x34)
[DSP] @0,125,597tk: [+0 T:0x87c32b54 S:0x87c367bc] OM - Memory_alloc> return (0x87c376a0)
[DSP] @0,125,659tk: [+4 T:0x87c32b54 S:0x87c367dc] CE - Engine_open> engine->server = 0x0
[DSP] @0,125,710tk: [+0 T:0x87c32b54 S:0x87c367dc] CE - Engine_open> return(-2017233248)
[DSP] @0,125,780tk: [+0 T:0x87c32b54 S:0x87c36824] OM - Memory_alloc> Enter(size=0x34)
[DSP] @0,125,829tk: [+0 T:0x87c32b54 S:0x87c36824] OM - Memory_alloc> return (0x87c376d8)
[DSP] @0,125,883tk: [+0 T:0x87c32b54 S:0x87c367fc] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x87c969c0, idma3Fxns=0x87c969ec, iresFxns=0x0, params=0x859048c0, attrs=0x87c36948)
[DSP] @0,125,982tk: [+0 T:0x87c32b54 S:0x87c367dc] OM - Memory_alloc> Enter(size=0x10)
[DSP] @0,126,030tk: [+0 T:0x87c32b54 S:0x87c367dc] OM - Memory_alloc> return (0x87c37710)
[DSP] @0,126,096tk: [+0 T:0x87c32b54 S:0x87c367bc] ti.sdo.fc.dskt2 - _DSKT2_init> Enter
[DSP] @0,126,172tk: [+0 T:0x87c32b54 S:0x87c367bc] ti.sdo.fc.dskt2 - _DSKT2_init> Exit
[DSP] @0,126,219tk: [+0 T:0x87c32b54 S:0x87c367cc] ti.sdo.fc.dskt2 - DSKT2_createAlg> Enter (scratchId=0, fxns=0x87c969c0, parentAlg=0x0, params=0x859048c0)
[DSP] @0,126,302tk: [+0 T:0x87c32b54 S:0x87c36754] ti.sdo.fc.dskt2 - _DSKT2_init> Enter
[DSP] @0,126,348tk: [+0 T:0x87c32b54 S:0x87c36754] ti.sdo.fc.dskt2 - _DSKT2_init> Exit
[DSP] @0,126,395tk: [+0 T:0x87c32b54 S:0x87c36764] ti.sdo.fc.dskt2 - DSKT2_createAlg3> Enter (scratchId=0, fxns=0x87c969c0, parentAlg=0x0, params=0x859048c0, extHeapId=-2054141760, singleHeap=0)
[DSP] @0,126,495tk: [+2 T:0x87c32b54 S:0x87c36764] ti.sdo.fc.dskt2 - DSKT2_createAlg3> DSKT2_AlgAttrs extHeapId -1 and singleHeap 0
[DSP] @0,126,579tk: [+2 T:0x87c32b54 S:0x87c36764] ti.sdo.fc.dskt2 - DSKT2_createAlg3> Num memory recs requested 214
[DSP] @0,126,671tk: [+2 T:0x87c32b54 S:0x87c36764] ti.sdo.fc.dskt2 - DSKT2_createAlg3> memTab allocated at 0x87c37ab0 size=0x10b8
[DSP] @0,126,955tk: [+7 T:0x87c32b54 S:0x87c36764] ti.sdo.fc.dskt2 - DSKT2_createAlg3> algAlloc returned numRecs=0
[DSP] @0,127,030tk: [+2 T:0x87c32b54 S:0x87c36764] ti.sdo.fc.dskt2 - DSKT2_createAlg3> memTab memory freed from 0x87c37ab0, size=4280
[DSP] @0,127,101tk: [+0 T:0x87c32b54 S:0x87c367cc] ti.sdo.fc.dskt2 - DSKT2_createAlg> Exit (algHandle=0x0)
[DSP] @0,127,155tk: [+7 T:0x87c32b54 S:0x87c367fc] 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] @0,127,286tk: [+0 T:0x87c32b54 S:0x87c367dc] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0x87c37710)
[DSP] @0,127,349tk: [+0 T:0x87c32b54 S:0x87c367ac] OM - Memory_f@0,972,259us: [+0 T:0xb65e0470 S:0xb65df64c] OC - Comm_put> Enter(queue=0x0, msg=0xb5b8f880)

  • I'm not on the codec team, but I do understand the CE/FC frameworks and maybe can help clarify what the trace is telling us.  Maybe this helps someone familiar with the particular codec jump in.

    Looks like you're trying to create an h264 encoder on the DSP, with creation parameters of 640x480, bitrate = 2000000 and ratectrl = 4.  It also looks like the codec creation is failing - inside the codec's XDAIS algAlloc() call, not at the CE/FC framework level.  This is typically b/c the creation parameters are incorrect or not supported.

    It doesn't look like you're out of DSP memory, nor does it look like any other DSP resource allocation (e.g. DMA) has failed.  It really just seems like the codec isn't happy with the creation parameters.

    The codec in question seems to be from TI - it's in the ti.sdo.codecs.h264enc package, from the omap3530/4_02_00_00-r1a release.  Sometimes the release notes for a codec will describe the supported creation params - maybe that's someplace to dig through.

    Sorry if this isn't directly helpful, but I'm hopeful that someone familiar with that codec can step in and help.

    Chris