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.

codec h264fhdvenc to encode 1080p failed

环境:

dvsdk_2_00_00_22 

dm6467_h264fhdvenc_01_10_02_03_production  dm6467_hdvicp_1_01_017_production

server.cfg

/* set up OSAL */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.runtimeEnv = osalGlobal.DSPLINK_BIOS;
osalGlobal.traceBufferSize = 0x40000;

/* configure default memory seg id to BIOS-defined "DDR" */
osalGlobal.defaultMemSegId = "DDR2";

/* Enable DSP-side BIOS logging */
var LogServer = xdc.useModule('ti.sdo.ce.bioslog.LogServer');

/*
 *  ======== Server Configuration ========
 */
var Server = xdc.useModule('ti.sdo.ce.Server');
Server.threadAttrs.stackSize = 16384;
/*
 * The optional stack pad to add to non-configured stacks.  This is well
 * beyond most codec needs, but follows the approach of "start big and
 * safe, then optimize when things are working."
 */
Server.stackSizePad = 9000;


/* get various codec modules; i.e., implementation of codecs */
var H264FHDVENC = xdc.useModule('ti.sdo.codecs.h264fhdvenc.ce.H264FHDVENC');
var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC');
var AACHEENC = xdc.useModule('ti.sdo.codecs.aacheenc.ce.AACHEENC');
var G711ENC = xdc.useModule('ti.sdo.codecs.g711enc.ce.G711ENC');

xdc.useModule('ti.sdo.codecs.hdvicp2.HDVICP');

if (prog.build.cfgArgs.profile == "eval"){
 print("Configuring server to use watermarked codecs...");

 H264FHDVENC.alg.watermark = true;
 H264ENC.alg.watermark = true;
 AACHEENC.alg.watermark = true;
 G711ENC.alg.watermark = true;
}
else
{
 H264FHDVENC.alg.watermark = false;
 H264ENC.alg.watermark = false;
 AACHEENC.alg.watermark = false;
 G711ENC.alg.watermark = false;
}

H264FHDVENC.alg.codeSection  = "DDR2";
H264FHDVENC.alg.intMemSection = "IRAM";
H264ENC.alg.codeSection  = "DDR2";
//H264ENC.alg.intMemSection = "IRAM";

/* Switching off Outs Bufs Cache */
H264FHDVENC.manageOutBufsCache = [ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ];
H264ENC.manageOutBufsCache = [ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ];

Server.algs = [   
    {name: "h264fhdvenc", mod: H264FHDVENC,groupId:0,threadAttrs: {
            stackMemId: 0, priority: Server.MINPRI + 1}
    },   
    {name: "h264enc", mod: H264ENC,groupId:0,threadAttrs: {
            stackMemId: 0, priority: Server.MINPRI + 1}
    },   
    {name: "aacheenc", mod: AACHEENC,groupId:1,threadAttrs: {
            stackMemId: 0, priority: Server.MINPRI + 2}
    },   
    {name: "g711enc", mod: G711ENC,groupId:1,threadAttrs: {
            stackMemId: 0, priority: Server.MINPRI + 2}
    },   
];

/*
 *  ======== DSKT2 and RMAN Configuration ========
 *  XDAIS Algorithm Memory and DMA allocation
 */
    var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');
    DSKT2.DARAM0     = "IRAM";
    DSKT2.DARAM1     = "IRAM";
    DSKT2.DARAM2     = "IRAM";
    DSKT2.SARAM0     = "IRAM";
    DSKT2.SARAM1     = "IRAM";
    DSKT2.SARAM2     = "IRAM";
    DSKT2.ESDATA     = "DDRALGHEAP";
    DSKT2.IPROG      = "IRAM";
    DSKT2.EPROG      = "DDR2";
    DSKT2.DSKT2_HEAP = "DDR2";    /* to allocate internal DSKT2 object */
    DSKT2.trace = true;
    DSKT2.debug = true;
      
    DSKT2.DARAM_SCRATCH_SIZES = [ 65536, 0, 0,0,0,0,0, /* ... */ 0 ];
    DSKT2.SARAM_SCRATCH_SIZES = [ 65536, 0, 0,0,0,0,0, /* ... */ 0 ];
  
    var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
    RMAN.useDSKT2 = true;
    RMAN.tableSize = 10;
    RMAN.semCreateFxn = "Sem_create";
    RMAN.semDeleteFxn = "Sem_delete";
    RMAN.semPendFxn = "Sem_pend";
    RMAN.semPostFxn = "Sem_post";
    RMAN.debug = true;
    RMAN.trace = true;
   
    var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');
   // EDMA3.globalInit = true;
    EDMA3.maxPaRams[0]           = 384;
    EDMA3.maxPaRams[1]           = 0;
    EDMA3.maxPaRams[2]           = 0;
    EDMA3.maxPaRams[3]           = 0;

    EDMA3.maxTccs[0]             = 49;
    EDMA3.maxTccs[1]             = 0;
    EDMA3.maxTccs[2]             = 0;
    EDMA3.maxTccs[3]             = 0;

    EDMA3.maxEdmaChannels[0]     = 49;
    EDMA3.maxEdmaChannels[1]     = 0;
    EDMA3.maxEdmaChannels[2]     = 0;
    EDMA3.maxEdmaChannels[3]     = 0;

    EDMA3.maxQdmaChannels[0] = 0;

    EDMA3.trace = true;
    EDMA3.debug = true;   

    var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN');
    EDMA3CHAN.debug = true;
    EDMA3CHAN.trace = true;

    var HDVICP =  xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP');
    HDVICP.debug = true;
    HDVICP.trace = true;

    var HDINTC = xdc.useModule('ti.sdo.fc.hdintc.HDINTC');
    HDINTC.interruptVectorId_0 = 10;
    HDINTC.interruptVectorId_1 = 11;
    HDINTC.hdvicpInterruptEventNo_0 = 29;
    HDINTC.hdvicpInterruptEventNo_1 = 39;

I have created the codec server but when I encode 1080p the demo failed.

 

Error: Failed to encode video buffer

 

 

  • In order to help deduce your problem, you will need to supply more detail as to the failure.  The first thing that would help is to set the CE_DEBUG environment variable to 3:
        % export CE_DEBUG=3
    and regenerate your failure.  There will be lots of output, but just post it here in a followup post and I or someone can take a look at it.

    Also, see if there is any console output associated with the failure, perhaps something to do with EDMAK or IRQK, and post it in your followup post.

    Regards,

    - Rob