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.

Failed to open video encode algorithm: h264fhdvenc (0x8)



Hello,

 

I am trying to use "h264fhdvenc" codec,

  VIDENC1_Params         params     = Venc1_Params_DEFAULT;  

  VIDENC1_DynamicParams  dyn_params = Venc1_DynamicParams_DEFAULT;

  params.maxWidth          = 720;  

  params.maxHeight         = 576;  

  params.rateControlPreset = IVIDEO_NONE;

  dyn_params.inputWidth      = 720;  

  dyn_params.inputHeight     = 576;  

  dyn_params.refFrameRate    = 25000;  

  dyn_params.targetFrameRate = 25000;

 

  // enc_handle = Venc1_create(codec_eng, (char *)"h264enc", &params, &dyn_params);  

  enc_handle = Venc1_create(codec_eng, (char *)"h264fhdvenc", &params, &dyn_params);  

  if(enc_handle == NULL)  

  {    

     printf("%s:%u Failed to create specific codec\n", __FILE__, __LINE__);    

     Engine_close(codec_eng);    

      exit(2);  

  }

 

This fails, but works beautifully for "h264enc" (as can be seen in comment).

Am I doing anything wrong,

 

 [DSP] @0,129,118tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x2c) [DSP] @0,129,161tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fc66ec8) [DSP] @0,129,210tk: [+0 T:0x8ba0006c] CE - Engine_open> return(-1882820920) [DSP] @0,129,267tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x34) [DSP] @0,129,306tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fc66ef8) [DSP] @0,129,349tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x8fb86bb4, idma3Fxns=0x0, iresFxns=0x8fb86b0c, params=0x8ff03940, attrs=0x8ba03e68) [DSP] @0,129,437tk: [+0 T:0x8ba0006c] OM - Memory_alloc> Enter(size=0x10) [DSP] @0,129,474tk: [+0 T:0x8ba0006c] OM - Memory_alloc> return (0x8fc66f30) [DSP] @0,154,208tk: [+7 T:0x8ba0006c] 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,154,333tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0x8fc66f30) [DSP] @0,154,385tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fc66f30, size=16) [DSP] @0,154,432tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1) [DSP] @0,154,466tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Exit [DSP] @0,154,508tk: [+0 T:0x8ba0006c] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0) [DSP] @0,154,554tk: [+6 T:0x8ba0006c] CV - VISA_create2> FAILED to create local codec. [DSP] @0,154,596tk: [+0 T:0x8ba0006c] CV - VISA_delete(0x8fc66ef8) [DSP] @0,154,634tk: [+5 T:0x8ba0006c] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff) [DSP] @0,154,688tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fc66ef8, size=52) [DSP] @0,154,733tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1) [DSP] @0,154,769tk: [+0 T:0x8ba0006c] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> return (0x0) [DSP] @0,154,821tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fc66e58, size=36) [DSP] @0,154,868tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1) [DSP] @0,154,902tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fc66e38, size=32) [DSP] @0,154,948tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1) [DSP] @0,154,985tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fc66e28, size=14) [DSP] @0,155,030tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1) [DSP] @0,155,064tk: [+0 T:0x8ba0006c] OM - Memory_free> Enter(addr=0x8fc66e10, size=24) [DSP] @0,155,109tk: [+0 T:0x8ba0006c] OM - Memory_free> return (0x1) @1,719,256us: [+0 T:0x4001f6d0] CE - Engine_fwriteTrace> returning count [3683] @1,719,374us: [+2 T:0x4001f6d0] CE - Engine_createNode> Returning 0x0 @1,719,479us: [+6 T:0x4001f6d0] CV - VISA_create2> FAILED to create remote codec (0x8). @1,719,583us: [+0 T:0x4001f6d0] CV - VISA_delete(0x6cdb0) @1,719,678us: [+5 T:0x4001f6d0] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff) @1,719,829us: [+0 T:0x4001f6d0] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> return (0x0) @1,719,949us: [+7 T:0x4001f6d0] ti.sdo.dmai - [Venc1] Failed to open video encode algorithm: h264fhdvenc (0x8) src/new_cap_arm.cpp:388 Failed to create specific codec @1,720,137us: [+0 T:0x4001f6d0] CE - Engine_close(0x6c978) @1,720,501us: [+0 T:0x4001f6d0] CE - Engine_fwriteTrace> returning count [0] @1,720,638us: [+0 T:0x4001f6d0] CS - Server_disconnectTrace('0x6c978', 0x0) @1,720,744us: [+0 T:0x4001f6d0] CS - Server_connectTrace> return(0) @1,721,494us: [+0 T:0x4001f6d0] CE - rserverClose(0x6a488), count = 1 @1,721,641us: [+0 T:0x4001f6d0] OP - Processor_delete> Enter(proc=0x6c9a8) @1,721,753us: [+0 T:0x4001f6d0] OP - doCmd> Enter (cmdId=2, proc=0x6c9a8) @1,721,858us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x6b1c0] @1,722,007us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x6b1c0] status[0] @1,724,481us: [+0 T:0x40bbd490] OP - getCmd_d> Exit (result=2) @1,724,664us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x6b1c0] @1,724,795us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x6b1d8] timeout[0xffffffff] @1,724,946us: [+0 T:0x40bbd490] OP - Processor_delete_d> Enter (proc=0x6c9a8) @1,725,066us: [+2 T:0x40bbd490] OP - Processor_delete_d> Closing remote transport... @1,725,586us: [+2 T:0x40bbd490] OP - Processor_delete_d> Stopping DSP... @1,725,802us: [+2 T:0x40bbd490] OP - Processor_delete_d> Closing pool... @1,726,285us: [+2 T:0x40bbd490] OP - Processor_delete_d> Detaching from DSP... @1,740,749us: [+2 T:0x40bbd490] OP - Processor_delete_d> Destroying DSP... (object, that is) @1,741,755us: [+0 T:0x40bbd490] OP - Processor_delete_d> return @1,741,895us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x6b1d8] @1,742,057us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x6b1d8] status[0] @1,743,185us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x6b1d8] @1,743,332us: [+0 T:0x40bbd490] OP - getCmd_d> Enter (proc=0x40bbcdd8) @1,743,444us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x6b1c0] timeout[0xffffffff] @1,743,594us: [+0 T:0x4001f6d0] OP - doCmd> Exit (result=1) @1,743,706us: [+1 T:0x4001f6d0] OP - Processor_delete(0x6c9a8) freeing object ... @1,743,816us: [+0 T:0x4001f6d0] OP - Processor_delete> return. @1,743,915us: [+0 T:0x4001f6d0] CE - rserverClose(0x6a488) done. @1,744,136us: [+0 T:0x4001f6d0] OP - doCmd> Enter (cmdId=3, proc=0x0) @1,744,264us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x6b1c0] @1,744,419us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x6b1c0] status[0] @1,744,548us: [+0 T:0x40bbd490] OP - getCmd_d> Exit (result=3) @1,744,653us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x6b1d8] @1,744,759us: [+0 T:0x40bbd490] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x6b1d8] @1,745,106us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x6b1c0] @1,745,249us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x6b1d8] timeout[0xffffffff] @1,745,363us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x6b1d8] status[0] @1,745,467us: [+0 T:0x4001f6d0] OP - doCmd> Exit (result=1) @1,745,559us: [+0 T:0x4001f6d0] OT - Thread_delete> Enter (task=0x6b210) @1,745,702us: [+4 T:0x4001f6d0] OT - Thread_delete> pthread_cancel (0x3) @1,745,822us: [+4 T:0x4001f6d0] OT - Thread_delete> pthread_join (0x0) @1,745,933us: [+0 T:0x4001f6d0] OT - Thread_delete> Exit (task=0x6b210) @1,746,034us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Entered Sem_delete> sem[0x6b1c0] @1,746,171us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Leaving Sem_delete> @1,746,278us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Entered Sem_delete> sem[0x6b1d8] @1,746,384us: [+0 T:0x4001f6d0] ti.sdo.ce.osal.Sem - Leaving Sem_delete>

 

  • Hi Laeeq,

    This error messages indicate that Codec Engine was unable to create an instance of the "h264fhdvenc" codec. I'd suggest you read through the documentation of the "h264fhdvenc" codec and maybe refer to one of its examples to find out more about supported creation parameters and the correct DSKT2 settings in order to use the codec.

    Best regards,

    Vincent

  • Hi Laeeq Khan,

    If i remember well, the h264fhdvenc require a modulo 32 for the width so you can't set input.width @ 720 but you can try 704 or 736 after a resizing of the video frame.

    (modula 16 for the height )

    Mika

  • Hello Mike Soso,

    Thanks for your help. You are absolutly right, when I changed the video width from 720 to 704, it worked beautifully. I read the user guide for

    h264fhdvenc codec again, but did not find this limitation mentioned there.

     

    One thing I would like to bring to your notice is, while the width 704 works, 736 does NOT work. I dont know what the reason is.

    Also, I noticed that, "dataEndianness" field for VIDENC1_Params has to be explicitly set to "XDM_LE_32" if you leave it the values from

    Venc1_Params_DEFAULT, it wont work.

     

    Thanks again.

    Laeeq Khan

  • Hi Laeeq Khan,

    For me, 736x576 works with the h264fhdvenc. What is the camera input resolution and DSP/ARM you are using ?

    dataEndianness must be set to XDM_LE_32.

    My h264fhdvenc version is 1.10.02.03 for a DM6467t.

    "Frequently asked question" (in the end of documentation) talks about the width and height limitation.

    Mika

  • Hi Mika,

     

    I am using a PAL camera that outputs a resolution of 720x576.

    I am using DSP/ARM DM6467

    H264FHDVENC.version.01.10.02.03.wizardversion.0.5.3

     

    Thanks for your help.

    Regards

    Laeeq Khan

  • Hi,

    DM6467 doesn't do upscaling (720 -> 736) maybe it's why you can't do it . If you really need to have 720x576 frame encoded you wiil have to create a buffer of 736 * 576 * 2 bytes with your 720x576 frame + some YUV black code.

    With h264 encoder for 720p (from ti) you will be able to do 720x576 resolution.

    Mika