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.

Integrating codecs into Codec Engine

Other Parts Discussed in Thread: OMAPL138

Hi all,

we have L138 and use DVSDK v4.03.00.06.

We want to integrate in the examples of Codec Engine (see 2_26_02_11) other codecs downloadable from texas such as mp3 or H.264 (downloadable from: http://www.ti.com/tool/c64xpluscodecs). At the moment we do not want to use DMAI.

Can anyone provide examples to achieve the goal?

Best regards.

Paolo.

  • Hi Paolo,

    This might be useful for you : http://processors.wiki.ti.com/index.php/How_do_I_Integrate_new_codecs_into_DVSDK

  • Hi

    I am Paolo's colleague, working on the same issue.

    We had follow the document you suggest, but after downloading and umpacking Mp3 Decoder we stop on 'Integration of a Codec Package to a Server/Combo Package'.

    It is said to copy:

     cp -r /<>/packages/ti/sdo/codecs/mp3dec /<>/CS/packages/ti/sdo/codecs/. 

    where CS is installation directory of codec server. But under

    ./ti-dvsdk_omapl138-evm_04_03_00_06/codec-engine_2_26_02_11

    there is no subdirectory packages/ti/sdo/codecs/. So we don't know how to go ahead.

    any suggestion?

    best regards

  • Hi Paolo/mastupristi,

    The wiki page is referring to an MP3 decoder as an example, but the information is generally applicable to any codec package. Codec packages are usually placed under <DVSDK_INSTALL_DIR>/codecs-omapl138_4_02_00_00/packages/ti/sdo/codecs in the omapl138 DVSDK.

    Given you said you did not intent to use DMAI, you can always use the basic Codec Engine API to instantiate and invoke the codec, in addition to the wiki page your are looking at. In general, refer to the documentation provided on the wiki and in the Codec Engine product (under the <CE_INSTALL_DIR>/docs directory) to get started.

    Best regards,

    Vincent

  • Yes,

    it works for MP3 codec downloaded from TI.

    But what we want to do is to write our own codec, and we don't know how to do this.

    For example if we want to add to cs.x674 a simple codec as audenc_copy (from codec engine examples) how can we do?

    Our goal is to create server containing standard codecs (such as MP3, AAC, WMA, H.264, etc.) and custom codecs (such as for example audenc_copy).

    best regards

  • Hi Masturpristi,

    In general, if you have your own codec, you should first compile your codec into a library file. Then use the gencodecpkg wizard (http://processors.wiki.ti.com/index.php/Codec_Engine_GenCodecPkg_Wizard_FAQ) to generate the packaging around the codec.This packaging is necessary for the server build process subsequently and contains metadata that describes the codec type and allows the codec to be configured in terms of code/data placement, watermarking, etc.. For TI codecs, this step was already done for you (i.e. what you see in the ti/sdo/codecs directory is already pre-packaged).

    For little example codecs such as audenc_copy that are shipped with the Codec Engine product, refer to the CE documentation on how to rebuild the codec package. Once it has been built, it acts just like any other codec package.

    Then the next step is to run the genserver wizard (http://processors.wiki.ti.com/index.php/Codec_Engine_GenServer_Wizard_FAQ#What_inputs_are_required.3F) which combines all your selected codec packages into a single codec server.

    Other useful links if you want to know more details about codec and server packages:

    Codec Engine Algorithm Creator User's Guide http://www.ti.com/lit/pdf/SPRUED6

    Codec Engine Server Integrator User's Guide http://www.ti.com/lit/pdf/SPRUED5

    Best regards,

    Vincent

  • Great,

    using gencodecpkg and genserver we can build a codec servers integrating all codecs provided by DVSDK, other codecs such as WMA and MP3 downloaded from TI, and our custom codecs.

    Only a question: after genserver, I run make to build cs.x674, but it fails. It doesn't find_MP3DEC_TII_IMP3DEC and _MP3DEC_INBUFCACHEFLUSH symbols. They are used in packages/ti/sdo/server/cs/codec.cfg:

        var MP3DEC = xdc.useModule('ti.sdo.codecs.mp3dec.ce.MP3DEC');

            MP3DEC.ialgFxns = "MP3DEC_TII_IMP3DEC";
            MP3DEC.serverFxns = "MP3DEC_INBUFCACHEFLUSH";
            MP3DEC.stubFxns = "AUDDEC1_STUBS";
            MP3DEC.alg.watermark = false;
            MP3DEC.alg.codeSection = codeSection;
            MP3DEC.alg.udataSection = udataSection;
            MP3DEC.alg.dataSection = dataSection;

    This seems strange to me because MP3DEC is the only one using ialgFxns and the only one that doesn't use "AUDDEC1_SKEL" for serverFxns.

    If I modify as follows:

        var MP3DEC = xdc.useModule('ti.sdo.codecs.mp3dec.ce.MP3DEC');

            MP3DEC.ialgFxns = "MP3DEC_TII_IMP3DEC";
            MP3DEC.serverFxns = "AUDDEC1_SKEL";
            MP3DEC.stubFxns = "AUDDEC1_STUBS";
            MP3DEC.alg.watermark = false;
            MP3DEC.alg.codeSection = codeSection;
            MP3DEC.alg.udataSection = udataSection;
            MP3DEC.alg.dataSection = dataSection;

    then it works fine.

    Is it a bug? Or maybe we're missing something?

    Best regards

  • Hi mastupristi,

    I'd suggest you take a look at the server that you originally had working with MP3 and look at what was needed in codec.cfg. I am not too familiar with this particular MP3 codec, so it is possible that you need specific skeleton functions (serverFxns) provided by the codec library (or not). Use your previous work as your model as the server wizard's output may sometimes need to be tweaked depending on how the codec package was originally created.

    Best regards,

    Vincent