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.

How do I handle multiple Codecs with the Codec Engine.

I am just a beginner to using the Codec Engine and I am overwhelmed with lots of different reading materials.  This is a little background of our project.  We have a custom built DM6446 board running linux.  We have the dvsdk 2_00_00_22 built into the project with the iUniversal Examples.  I have successfully built and debugged the fir example in CCS 4 by running the fir test application in linux.  Now I am onto the step of figuring out how to add all the other algorithms for our project.  Some of the other algorithms we need to add are an ADPCM encoder/decoder, goertzel algorithms, fir filters, iir filters, etc.  Here a couple of general questions.

1.  Are the algorithms built as separate library files or binaries (like the FIR Example) or built directly into the linux application?

2.  How are people handling a mixture of iUniversal algorithms and XDM algorithms?

Thanks.

  • The Codec Engine allows you to access the codecs/algorithms running on the DSP from the ARM. For an ARM developer, it abstracts the details of loading/starting the DSP, interprocessor communications,  setting up shared memory, cache coherency, etc.

    Conceptually, CE is similar to the Sun RPC with the only difference - CE communicates across processors, RPC communicates across network. In that sense, the CE has stubs on ARM to "marshal" the arguments into a message and skeletons on DSP to "unmarshal" the message into arguments.

    There are two different parts to any CE application:

    1. ARM binary - the application itself + CE stubs + ...       (intentionally left blanks as they are not relevant to this discussion):

    2. DSP binary - the codec/algorithm library + CE skeletons + BIOS + ...

    The DSP binary aka Codec Server is built separately with the codec/algorithm libraries. You can add algorithms by modifying the .cfg file of the codec server. The important point to note here is all libraries required for execution should be built together at once. Unlike Linux, you cannot insert a module or add a file to the DSP at run time [well, it's possible but not straightforward]. The final DSP binary created is some <server>.x64P

    The ARM application loads the DSP binary by calling a CE API - Engine_open(). This returns an engine handle which can be used to create the actual codec instances. To invoke each algorithm, you need to call corresponding create() function.

    To answer the exact questions:

    1.  Are the algorithms built as separate library files or binaries (like the FIR Example) or built directly into the linux application?

    The algorithms (if based on DSP) are built into the precompiled DSP binary. The ARM/Linux application just loads the DSP binary

    2.  How are people handling a mixture of iUniversal algorithms and XDM algorithms?

    This is easily handled by including all the required algorithm packages into the DSP .cfg file

    The following links should give more details on the whole process.

    1. Integrating xDM video codec:

    http://processors.wiki.ti.com/index.php/I_just_want_my_video_codec_to_work_with_the_DVSDK

    2. Integrating a codec into DVSDK

    http://processors.wiki.ti.com/index.php/How_do_I_Integrate_new_codecs_into_DVSDK

    3. IUNIVERSAL - getting started

    http://processors.wiki.ti.com/index.php/Getting_started_with_IUNIVERSAL

    4. Changing the configuration of ARM application

    http://processors.wiki.ti.com/index.php/Configuring_Codec_Engine_in_Arm_apps_with_createFromServer

     

    Much more help topics are available at:

    http://processors.wiki.ti.com/index.php/Category:MFP

    http://processors.wiki.ti.com/index.php/Category:DVEVM

    http://processors.wiki.ti.com/index.php/Category:Codecs

     

    Hope this helps you get started.

    Regards,

    Anand Balagopalakrishnan

  • Thanks this is a lot of help.  Now just to clarify, I have the iUniversal Example built into my project.  The example is composed of 2 algorithms fir and rand.  When these are built they are built as seperate servers fir_unitserver_evmdm6446.x64P and randgen_unitserver_evmdm6446.x64P.  I then also have test applications  remote_ti_platforms_evmDM6446_fir.xv5T and remote_ti_platforms_evmDM6446_randgen.xv5T.  During my testing I would run each of the .xv5T seperately to debug them.  But in practice the algorithms would all be built into the same .x64P server?  Thanks.

  • Many users use the [new] GenServer wizard to create their Server.  Recent versions support the ability to create servers with multiple algorithms.

    http://processors.wiki.ti.com/index.php/Codec_Engine_GenServer_Wizard_FAQ

    Servers have always supported multiple algorithms, but older _wizards_ only had the ability to create a 'unit server' with one algorithm in it.  (That's where the term 'unit' came from in 'unit server'.  I never really liked that name...)

    If you don't want to use the GenServer wizard (or can't b/c you must stay on an older version of Codec Engine), you can refer to the examples/ti/sdo/ce/examples/servers/all_codecs example provided in the Codec Engine product.  The .cfg scripts in that example show how to add _many_ codecs to a single Server.

    Chris