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.

Algorithm creation failure on DM6467 for H.264 decoder version 1.10.04.00

In order to implement a workaround for a problem I have, I want to reset my decoder on the DM6467 using XDM_RESET.

Since my CODEC was an old one (1.00.011) which does not support XDM_RESET, I downloaded a newer one (1.10.04.00). I compiled the DVSDK with the new CODEC, but when I try to run my application with the new CODEC, I get 'Algorithm creation failure'. I also attached the file with the CE_DEBUG=3 output.

Can you help?

  • Hopefully someone on the codec team can jump in here, but I suspect the newer codec either has:

    • updated creation params, or
    • different (maybe higher) resource requests than the previous version.  If so, you may have to update the Server config a bit.

    Did the codec come with either a Users Guide or example app you might use to sanity check your creation params?  If those look ok, you could enable FC tracing in your Server and rerun with CE_DEBUG=3 to explore whether it's an 'out of resources' issue.

    Chris

  • Thanks for the fast reply.

    Regarding the resource requests by the CODEC, I understand from the datasheet of the CODEC that there is no need from more resources - I may be wrong.

    Regarding the creation params, I also checked the code of the decode demo for the DVSDK 3.10 (although not for the DM6467) assuming it uses a newer CODEC. According to this code, no changes were made regarding to creation params.

    The CODEC does come with a user guide, but with no example app, so I cannot check the creation params.

    I will try to use the FC tracing, although It might be faster if someone from the codec team can help here.

     

    Thank you

  • Nir,

    Example test app will be available with the codec with the name as "h264vdec_ti_testappdecoder.c", please cross check creation time parameters once again. As Chris has mentioned, cross check once again about the resouurces requested by the decoder, which may be the main cause for the failure.

    Regards,

    Mahantesh

     

     

  • I found the example app that comes with the codec and it is not much different from the old one that came with the previous codec. Anyway, there is one parameter that was added to the new codec and I also added it to my application, but still I get the Algorithm creation error.

    I also tried increasing the SCRATCH size (doubled it), but again the error appeared.

    I tried to enable FC tracing as described, but I think I am doing something wrong, since no tracing is output to the console. 

    Can you send a code snippet to show how to call 'Vdec2_create' with the 1_10 version decoder? I think this will be much faster.

     

    Thank you

  • Nir,

    Codec level API call for alg create is as follows,

    /* Alg handle */

    IALG_Handle  handle;

    handle = (IALG_Handle) H264VDEC_create
                               (
                                 (IALG_Fxns *) &H264VDEC_TII_IH264VDEC,
                                 (IALG_Params *) &params
                               );

    Please check in "h264vdec_ti_testappdecoder.c" file and in the user guide for more information on the same. 

    Its better to verify your DVTB setup version as well, whether they are upto date, since you have down loaded the latest decoder release package.

    Regards,

    Mahantesh

  • Thanks,

    I also saw this code in the "h264vdec_ti_testappdecoder.c" file, but this does not help, since my application (and also the decode demo application) works on top of DMAI.

    This code uses a call which is not imnplemented in the DMAI. DMAI uses the call 'Vdec2_create'.

    I also checked with the decode demo application which comes with the board and still get the same error.

    Is there new code for the decode demo which works with version 1_10 of the h264 decoder? If yes, a code snippet of the algorithm creation in this demo, would help.

     

    Thank you 

  • The 'extra' create param field will be important - you need to make sure your create params match what the codec is expecting.  Note that, in all cases I know of, the create params struct you pass to CE's VIDDEC2_create() or DMAI's Vdec2_create() is equivalent.  So whichever interface you use, the struct is typically the same.  Also, ensure your _app_ is #include'ing the header for the _new_ codec create params data type, not the old one to ensure the correct struct definition is built into your app.

    Nir Aloni said:
    I tried to enable FC tracing as described, but I think I am doing something wrong, since no tracing is output to the console. 

    I think we need to sort out this issue you're having with enabling FC tracing.  It will help us understand whether the codec is failing (during it's algInit() call... indication it's a create params issue) or whether the framework is unable to provide the codec with the resources it needs (indicating it's a resource configuration issue).  Can you post the steps you took to enable FC  tracing  (what lines did you drop in your _Server_ config script?) and what output did you see on the console?

    Chris

  • Thank you Chris,

    I added the extra params in the decode demo of DVSDK (video.c file of the decode demo is attached), but I still get the 'Algorithm creation failed' message.

    Regarding the FC tracing, I added the following lines to the decode.cfg file in the decode demo folder:

    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";

  • Nir Aloni said:
    Regarding the FC tracing, I added the following lines to the decode.cfg file in the decode demo folder:

    Can you confirm that decode.cfg is used to build the DSP-side server (I'm not familiar enough with the DVSDK to know)?  Remember that the failure is occurring on the DSP-side server, so you'll need to enable FC tracing in the DSP-side Server script.

    Also note that in the Trace in FC article, the config lines you added are only the first of two steps.  The 2nd step is to also add this:

        //Switch to debug + trace profile for all FC modules
        xdc.useModule('ti.sdo.fc.global.Settings').profile = "debug_trace";

    Chris

  • Chris,

    The decode.cfg I used before is not used to build the DSP-side server. I found the decode.cfg which is used to build the DSP-side server and changed it to activate the trace.

    Now when using CE_DEBUG=3 which my application, I can see more messages on the log and it seems the trace works.

    Can you figure out what is wrong and why I get 'Algorithm creation failed' from the attached trace?

     

    Thank you

  • Hi,

    The log shows that algInit() fails. As Chris mentioned this means that one of the creation parameters is not correct. They are defined in VIDDEC2_Params.

    Please print the creation paramters you are using and post them on the Forum.

    The sample app that comes with the codec can be usually run and used as a reference. However it will require Codec Composer Studio to run.

    If you are able to run this app you can compare the creation params to the ones you are using in your app.

    If not, please provide the creation params to the forum.

    Thanks

    cesar

  • Hi,

    I already posted the video.c file which contains the parameters I use. See video.c in previous posts.

  • Please take a look at the creation parameter forceChromaFormat.

    In h264dec v1.00 forceChromaFormat = XDM_YUV_420P (default value in Vdec2_Params_DEFAULT)

    In h264dec v1.10 forceChromaFormat = XDM_YUV_420SP

    Thanks

    cesar

  • Thank you very much cesar, This solved the problem.