First, it looks like your on a DM355 or DM365 as this codec is 'local' (i.e. 
running on the same processor as your app).  That helps eliminate some 
complexity (e.g. no DSP Link, and no DSKT2... the warning msg is misleading - 
there's no DSKT2 in a DM355/365 system).

Also from the trace, I can see that the memory requested by the alg succeeds 
(the codec needs 7 distinct memory blocks, and I can see 7 successful CMEM 
alloc() calls being made).

However, during the algInit() call (where Codec Engine provides this newly 
allocated memory to the codec), the codec is returning 49280 (0xC080).  So the 
codec didn't like something it was given - either the memory (unlikely) or the 
creation params(?) - and returned this error.

Do the codec docs (or headers?) provide any details about this specific error 
code (0xC080)?  Does it fail if you pass in NULL as the create() params?

Finally, to your specific question, the error returned (mpeg4enc (0x0)) 
indicates a NULL handle, not a success code.

Chris 

> -----Original Message-----
> From: davinci-linux-open-source-boun...@linux.davincidsp.com 
> [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com
] On Behalf Of Paul Stuart
> Sent: Tuesday, January 05, 2010 7:26 AM
> To: Tivy, Robert; davinci-linux-open-source@linux.davincidsp.com
> Subject: RE: Arago Kerenel w/ codec_engine_2_00_01 issues?
> 
> Thanks for the response!
> 
> I'll give the latest CMEM, LinuxUtils, et al a whirl and see 
> what happens. The strange thing is that the mpeg4 decoder, 
> jpeg encode/decode, and mp3 encode/decode all load without 
> complaint. It's just the mpeg4enc that fails.
> 
> 
> I've rebuilt cmemk.ko and dm350mmap.ko against the arago 
> kernel. Neither process was straight forward though because 
> of changes between the montavista kernel we were using. Maybe 
> something got botched in the process.
> 
> 
> Turning on the trace, with CE_DEBUG=2, I get the following 
> during mpeg4enc initialization:
> 
> 
> @5,653,051us: [+0 T:0x43300490] ti.sdo.ce.video1.VIDENC1 - 
> VIDENC1_create> Enter (engine=0x100670, name='mpeg4enc', 
> params=0x432ffca8)
> @5,653,350us: [+0 T:0x43300490] CV - VISA_create(0x100670, 
> 'mpeg4enc', 0x432ffca8, 0x2496, 'ti.sdo.ce.video1.IVIDENC1')
> @5,653,569us: [+0 T:0x43300490] CV - VISA_create2(0x100670, 
> 'mpeg4enc', 0x432ffca8, 0x30, 0x2496, 'ti.sdo.ce.video1.IVIDENC1')
> @5,654,187us: [+0 T:0x43300490] ti.sdo.ce.alg.Algorithm - 
> Algorithm_create> Enter(fxns=0xf89c0, idma3Fxns=0xf8988, 
> iresFxns=0x0, params=0x432ffca8, attrs=0x432ffac8)
> @5,654,470us: [+0 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create> Enter (scratchId=1, fxns=0xf89c0, parentAlg=0x0, 
> params=0x432ffca8)
> @5,678,280us: [+2 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create> algNumAlloc 7 memory recs
> @5,678,574us: [+2 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create> algAlloc returned numRecs=7
> @5,678,777us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[0]: size=0x2c58, 
> align=0x100, space=0x11, attrs=0x1
> @5,678,985us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[1]: size=0x200, 
> align=0x100, space=0x11, attrs=0x1
> @5,679,182us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[2]: size=0x19a400, 
> align=0x100, space=0x11, attrs=0x1
> @5,679,568us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[3]: size=0x10e0, 
> align=0x100, space=0x11, attrs=0x1
> @5,679,816us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[4]: size=0x4, 
> align=0x100, space=0x11, attrs=0x1
> @5,680,026us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[5]: size=0x14000, 
> align=0x100, space=0x11, attrs=0x1
> @5,680,233us: [+4 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create>  Memory requested memTab[6]: size=0x3840, 
> align=0x100, space=0x11, attrs=0x1
> @5,680,648us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(11352) = 0x43301000.
> @5,680,909us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x43301000) = 0x8702c000.
> @5,681,514us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(512) = 0x42a02000.
> @5,681,792us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x42a02000) = 0x87018000.
> @5,682,401us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(1680384) = 0x43305000.
> @5,682,711us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x43305000) = 0x87e00000.
> @5,698,324us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(4320) = 0x43505000.
> @5,698,622us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x43505000) = 0x8702a000.
> @5,699,098us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(4) = 0x43507000.
> @5,699,535us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x43507000) = 0x87019000.
> @5,700,033us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(81920) = 0x43508000.
> @5,700,348us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x43508000) = 0x8704e000.
> @5,701,570us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_alloc(14400) = 0x4351c000.
> @5,701,844us: [+4 T:0x43300490] OM - Memory_contigAlloc> 
> CMEM_getPhys(0x4351c000) = 0x87030000.
> @5,757,804us: [+7 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create> algInit call failed 49280
> @5,765,522us: [+0 T:0x43300490] ti.sdo.ce.osal.alg - 
> ALG_create> Exit (algHandle=NULL)
> @5,765,791us: [+7 T:0x43300490] 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
> @5,766,031us: [+0 T:0x43300490] ti.sdo.ce.alg.Algorithm - 
> Algorithm_delete> Enter(alg=0x1fb020)
> @5,766,236us: [+0 T:0x43300490] ti.sdo.ce.alg.Algorithm - 
> Algorithm_create> return (0x0)
> @5,766,462us: [+2 T:0x43300490] CV - VISA_create> FAILED to 
> create local codec.
> @5,766,648us: [+0 T:0x43300490] CV - VISA_delete(0x1439f8)
> @5,766,817us: [+5 T:0x43300490] CV - VISA_delete> deleting 
> codec (localQueue=0xffff, remoteQueue=0xffff)
> @5,767,009us: [+0 T:0x43300490] ti.sdo.ce.video1.VIDENC1 - 
> VIDENC1_create> return (0x0)
> Dvr_Titler Error: Failed to open video encode algorithm: 
> mpeg4enc (0x0)
> 
> 
> >From the trace, it looks like cmem is allocating the the 
> memory requested. I've tried passing in the default 
> parameters to the algorithm, the parameters used in the dvsdk 
> encode demo, as well as the parameters that worked for us 
> previously. I don't know how to check the DSKT2 settings.
> 
> Is there any way to add more tracing to the Algorithm create? 
> It fails somewhat silently. Also strange that the last error 
> from the Codec engine is 0x0 (mpeg4enc (0x0)), not sure why 
> it would fail to initialize the algorithm and still return no error.
> 
> 
> I appreciate the help!
> 
> Paul
> 
> ________________________________________
> From: Tivy, Robert [rt...@ti.com]
> Sent: Monday, January 04, 2010 6:07 PM
> To: Paul Stuart; davinci-linux-open-source@linux.davincidsp.com
> Subject: RE: Arago Kerenel w/ codec_engine_2_00_01 issues?
> 
> Generally, user-level code doesn't care much about the kernel 
> version, and CE itself is all user-level code.  Since CE 
> encapsulates other packages that do contain kernel modules 
> (which do care about kernel version), such as CMEM in 
> LinuxUtils and DSPLink, the problem probably is with those.
> 
> The kernel modules call APIs that can come or go with 
> particular Linux kernels, hence the dependency of kernel 
> modules on the kernel.  Typically you will need to rebuild 
> the kernel modules for the particular kernel that you're 
> running.  Rebuilding is also important with respect to simply 
> inserting the kernel modules (usually done with a 
> "loadmodules.sh" script) - you can't insert a kernel module 
> that's been built against a kernel other than the one you're 
> running (although there is some flexibility if the kernels in 
> question are "close enough" to each other).
> 
> It would help if you described your problem opening the 
> mpeg4enc video encode algorithm.  CE 2.00.01 is fairly old at 
> this point, much older than 2.6.26 Linux.  I would suggest 
> updating to a newer CE, which also might just fix your problem.
> 
> Regards,
> 
> - Rob
> 
> > -----Original Message-----
> > From: davinci-linux-open-source-boun...@linux.davincidsp.com
> > [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com
> > ] On Behalf Of Paul Stuart
> > Sent: Thursday, December 31, 2009 12:55 PM
> > To: davinci-linux-open-source@linux.davincidsp.com
> > Subject: Arago Kerenel w/ codec_engine_2_00_01 issues?
> >
> > Hi There,
> >  Wondering if there is any magic that has to happen to make
> > the dvsdk's codec engine (2_00_01) play with the arago kernel
> > (2.6.26)? Everything compiles fine, but my app can't open the
> > mpeg4enc video encode algorithm.
> > Thanks,
> > Paul
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > Davinci-linux-open-source@linux.davincidsp.com
> > 
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> >
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to