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.

VIDENC1_create and IMAGEENC1_create fail because Assignment of alg resources through RMAN FAILED (0x7)

Hi,

 

I'am trying to run both h264 enc and jpeg enc on a dm365 but when I try to create the instance I get some errors. I activated CE_DEBUG and the debug/trace options ( xdc.useModule(...).profile = "trace_debug" in my .cfg file) and this is what I get :

@1,077,889us: [+7 T:0x00000400] ti.sdo.fc.ires.vicp2 - IRESMAN_VICP2_getHandles> Allocation of  assignedIMCOPBuffers for the VICP2 handle failed numResources 32 sgrp 1
@1,079,477us: [+7 T:0x00000400] ti.sdo.ce.alg.Algorithm - Algorithm_create> Assignment of alg resources through RMAN FAILED (0x7)

 

Here is  of my .cfg

/* Load support for the Codec Engine OSAL */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.runtimeEnv = osalGlobal.LINUX;
var GT = xdc.useModule('ti.sdo.utils.trace.GT');
var GTINFRA = xdc.useModule("ti.sdo.fc.utils.gtinfra.GTINFRA");
GTINFRA.runtimeEnv = GTINFRA.NONE;
GT.MALLOCFXN = "myMalloc";
GT.PRINTFXN = "printfCaller";


environment['xdc.cfg.check.fatal'] = 'false';


var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
RMAN.useDSKT2 = false;
RMAN.persistentAllocFxn = "__ALG_allocMemory";
RMAN.persistentFreeFxn = "__ALG_freeMemory";
RMAN.semCreateFxn = "Sem_create";
RMAN.semDeleteFxn = "Sem_delete";
RMAN.semPendFxn = "Sem_pend";
RMAN.semPostFxn = "Sem_post";
RMAN.tableSize = 10;

var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');

var vicp = xdc.useModule('ti.sdo.linuxutils.vicp.VICP');
var HDVICP = xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP');
var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2');
var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC');
var HDVICPSYNC = xdc.useModule('ti.sdo.fc.hdvicpsync.HDVICPSYNC');

var MEMUTILS = xdc.useModule('ti.sdo.fc.memutils.MEMUTILS');
var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE');

var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN');
var LSP = xdc.useModule('ti.sdo.linuxutils.edma.EDMA');
var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM');

var MEMTCM = xdc.useModule('ti.sdo.fc.ires.memtcm.MEMTCM');
MEMTCM.cmemBlockId = 1; //Since we use _1 in our insmod command.


xdc.loadPackage("ti.sdo.ce.video1");
xdc.loadPackage("ti.sdo.ce.image1");
xdc.loadPackage("ti.sdo.ce.audio1");
xdc.loadPackage("ti.sdo.fc.hdvicpsync");

/*
 *  ======== Engine Configuration ========
 */

var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC');
var AACENC = xdc.useModule('ittiam.codecs.aaclc_enc.ce.AACLC_ENC');
var AACDEC = xdc.useModule('ittiam.codecs.aac_dec.ce.AAC_DEC');
var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC');

var Engine = xdc.useModule('ti.sdo.ce.Engine');
var myEngine = Engine.create("encode", [

    {name: "h264enc", mod: H264ENC, local: true, groupId: 1},
    {name: "aacenc", mod: AACENC, local: true},
    {name: "jpgenc", mod: JPEGENC, local: true, groupId: 1},
    {name: "aacdec", mod: AACDEC, local: true},
]);


/*
xdc.loadPackage('ti.sdo.fc.ires.vicp').profile = "debug_trace";
xdc.loadPackage('ti.sdo.fc.ires.edma3chan').profile = "debug_trace";
xdc.loadPackage('ti.sdo.fc.rman').profile = "debug_trace";
xdc.loadPackage('ti.sdo.fc.edma3').profile = "debug_trace";
*/
xdc.useModule('ti.sdo.fc.global.Settings').profile = "debug_trace";
EDMA3CHAN.trace = true;
EDMA3CHAN.debug = true;

 

I try some modifications that I found on others posts on this forum regarding Assignment of alg resources through RMAN FAILED (0x7)  but I can't find any resolution for my particular problem " Allocation of  assignedIMCOPBuffers for the VICP2 handle failed".

 

What is weird is that it fails at the first attempt but if I retry just after the failure it works.

 

Coud anyone help me on this problem ?

 

Thanks