DVSDK-Version:ti-dvsdk_dm3730-evm_4_00_00_22
通过CE_DEBUG=3 执行demo程序,有以下log输出。
[DSP] @9,455,233tk: [+0 T:0x8790e914 S:0x879168d4] CR - processRmsCmd(0x860048a8, 4056): cmd = 0 [DSP] @9,455,311tk: [+0 T:0x8790e914 S:0x879167b4] OM - Memory_alloc> Enter(size=0x18) [DSP] @9,455,367tk: [+0 T:0x8790e914 S:0x879167b4] OM - Memory_alloc> return (0x8791b968) [DSP] @9,455,422tk: [+0 T:0x8790e914 S:0x879167b4] OM - Memory_alloc> Enter(size=0xa) [DSP] @9,455,468tk: [+0 T:0x8790e914 S:0x879167b4] OM - Memory_alloc> return (0x8791b980) [DSP] @9,455,528tk: [+0 T:0x8790e914 S:0x87916774] OM - Memory_alloc> Enter(size=0x20) [DSP] @9,455,578tk: [+0 T:0x8790e914 S:0x87916774] OM - Memory_alloc> return (0x8791b990) [DSP] @9,455,630tk: [+0 T:0x8790e914 S:0x87916744] OM - Memory_alloc> Enter(size=0x24) [DSP] @9,455,677tk: [+0 T:0x8790e914 S:0x87916744] OM - Memory_alloc> return (0x8791b9b0) [DSP] @9,455,775tk: [+0 T:0x8790e914 S:0x8791675c] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> Enter (engine=0x0, name='h264enc', params=0x860048c0) [DSP] @9,455,851tk: [+0 T:0x8790e914 S:0x87916724] CV - VISA_create(0x0, 'h264enc', 0x860048c0, 0x520, 'ti.sdo.ce.video1.IVIDENC1') [DSP] @9,455,925tk: [+0 T:0x8790e914 S:0x87916604] CV - VISA_create2(0x0, 'h264enc', 0x860048c0, 0x30, 0x520, 'ti.sdo.ce.video1.IVIDENC1') [DSP] @9,456,038tk: [+0 T:0x8790e914 S:0x879165e4] OM - Memory_alloc> Enter(size=0x34) [DSP] @9,456,088tk: [+0 T:0x8790e914 S:0x879165e4] OM - Memory_alloc> return (0x8791ba08) [DSP] @9,456,142tk: [+0 T:0x8790e914 S:0x879165bc] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x87991198, idma3Fxns=0x879911c4, iresFxns=0x0, params=0x860048c0, attrs=0x87916708) [DSP] @9,456,239tk: [+0 T:0x8790e914 S:0x8791659c] OM - Memory_alloc> Enter(size=0x10) [DSP] @9,456,285tk: [+0 T:0x8790e914 S:0x8791659c] OM - Memory_alloc> return (0x8791ba40) [DSP] @9,456,503tk: [+7 T:0x8790e914 S:0x879165bc] 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] @9,456,640tk: [+0 T:0x8790e914 S:0x8791659c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0x8791ba40) [DSP] @9,456,703tk: [+0 T:0x8790e914 S:0x8791656c] OM - Memory_free> Enter(addr=0x8791ba40, size=16) [DSP] @9,456,760tk: [+0 T:0x8790e914 S:0x8791656c] OM - Memory_free> return (0x1) [DSP] @9,456,806tk: [+0 T:0x8790e914 S:0x8791659c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Exit [DSP] @9,456,858tk: [+0 T:0x8790e914 S:0x879165bc] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0) [DSP] @9,456,912tk: [+6 T:0x8790e914 S:0x87916604] CV - VISA_create2> FAILED to create local codec.
通过修改codecs-omap3530_4_00_00_00/packages/ti/sdo/server/cs/memmap.tci 修改DDRALGHEAP 和DDR2 为原值2倍+;同时修改linux kernel启动参数mem=64MB, 配置CMEM 32MB,memmap.tci 中配置DDRALGHEAP 和DDR2 分别22MB和9MB,但依然报上面的错误。
错误排除:
1. 先初始化h264enc,再初始化jpegenc时,h264enc初始化成功,初始化jpegenc失败,同样错误;
2. 先初始化jpegenc,再初始化h264enc时,jpegenc初始化成功,初始化h264enc失败,同样错误;
从错误提示信息来看,应该是以下配置有问题:
var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
DSKT2.DARAM0 = "L1DHEAP";
DSKT2.DARAM1 = "L1DHEAP";
DSKT2.DARAM2 = "L1DHEAP";
DSKT2.SARAM0 = "L1DHEAP";
DSKT2.SARAM1 = "L1DHEAP";
DSKT2.SARAM2 = "L1DHEAP";
DSKT2.ESDATA = "DDRALGHEAP";
DSKT2.IPROG = "L1DHEAP";
DSKT2.EPROG = "DDRALGHEAP";
DSKT2.DSKT2_HEAP = "DDR2";
其中DDRALGHEAP 和DDR2 都已改为原来的2倍,不知道L1DHEAP 值在什么地方修改?
出现这种问题后,还有没有其他需要注意的地方?
Yan Zhang14:
错误提示:
>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
由于单独创建都可以正常工作,只有同时创建时,只能创建第一个,所以判断为资源限制。
codecs-omap3530_4_00_00_00/packages/ti/sdo/server/cs/memmap.tci 中DDRALGHEAP 和DDR2 都已改为原来的2倍,不知道L1DHEAP 值在什么地方修改?
Chris Meng:
回复 Yan Zhang14:
你好,
你找找dsp相关的cfg文件里面有没有相关的配置。
Yan Zhang14:
回复 Chris Meng:
在codecs-omap3530_4_00_00_00/packages/ti/sdo/server/cs/server.tcf中发现以下配置,不知再怎么找下去了。
/* L1DSRAM */bios.L1DSRAM.createHeap = true;bios.L1DSRAM.enableHeapLabel = true;bios.L1DSRAM["heapLabel"] = prog.extern("L1DHEAP");bios.L1DSRAM.heapSize = bios.L1DSRAM.len;
cfg文件中也没有发现对应的配置,附件为对应cfg文件。
Yan Zhang14:
回复 Yan Zhang14:
初步分析了下,h264enc使用L1DHEAP大小为64k,而jpegenc使用约8K。修改L1DMode的size 为8k,将L1DHEAP 改为72k。仍然报类似错误,不知dvsdk4.0 能否支持h264enc & jpegenc同时创建?
codec server 相关配置如附件,不知还有什么地方不合适的?