Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Codec Servers FAQ

From Texas Instruments Wiki
Jump to: navigation, search

Codec Bundles FAQ

What is a codec bundle?

It's nothing more than a collection of codecs. It is a set of tar-files containing individual codecs wrapped up into 1 deliverable. Download Codec Bundles here.

The current bundles do not contain any Codec Servers (aka codec-combos). I.e. there is no DSP-executable supplied. It is simply the individual codec libraries packaged for use by Codec Engine.

How do I get other codecs (video, imaging, speech) e.g. H.264 decode for DM6446?

To avoid duplication the recommendation is to get the majority of the codecs from the current Codec Combos being delivered as part of the most recent DVSDK programs. For example: -


Codecs available in the DVSDK programs
Platform DVSDK Codecs
OMAP3530 >= DVSDK 3.0
  • Video : MPEG4 Decoder, H264 Decoder, MPEG2 Decoder, H264 Encoder, MPEG4 Encoder
  • Audio : AAC HE Decoder
  • Imaging : JPEG Decoder, JPEG Encoder
  • Speech :
DM644x >= DVSDK 2.0
  • Video : MPEG2 MP Decoder, MPEG4 SP Decoder, H.264 BP Decoder, MPEG4 SP Encoder, H.264 BP Encoder
  • Audio : MPEG4 AAC HE Decoder
  • Imaging :
  • Speech : G711 Decoder, G711 Encoder
DM646x >= DVSDK 2.0
  • Video : MPEG2 MP Decoder, H.264 BP Decoder, H.264 BP Encoder
  • Audio : MPEG4 AAC HE Decoder, MPEG4 AAC HE Encoder
  • Imaging :
  • Speech : G711 Decoder, G711 Encoder

All of the codecs listed above implement the XDM 1.x interface; this is a superior interface for Video, Imaging, Speech, Audio than its predecessor (XDM 0.9).

These are production codecs (not evaluation codecs i.e. no watermark, audio-beep etc).

Download the codec-combo directly. Linux & Windows installers are available.

I just downloaded the audio bundle. Can I use it on any TI Davinci/OMAP SoC?

Yes. These are c64+ codecs. The audio codecs can run on any platform that includes a c64x+ DSP. Hence you could run the MP3 decoder on the DSP-side of e.g. DM6437, DM6446, DM6467, OMAP3530 etc.

You could also use it on the OMAP-L1 device family DSP-side - it just wont leverage the new floating point capabilities.

Note however that recent SDK releases (e.g. SDK 5.x releases for TI81xx devices) require ELF libraries for use on the DSP. ELF and COFF libraries cannot be mixed in one executable, so be sure to download the appropriate libraries (COFF/ELF) for your environment.

How do I run an audio bundle codec in DVSDK environment?

I'm not using the DVSDK. How do I extract and use one of these codecs?

Just point to the individual codec library and its associated header files. To use any of these in a non-XDC, non-Codec Engine, non-DVSDK flow check out this article.

Codec Server FAQ

Do I really need to manually build the codec server before trying to build the DVSDK?

The answer is Yes/No.

Yes: Under any conditions triggering a new memory map for the codec server. Few examples are as below.

  1. There is a need to add/remove codecs AND/OR
  2. Optimize DDRALGHEAP/DDR sizes for the codec server AND/OR
  3. Need to relocate the released codec server's memory footprints AND/OR
  4. Need to modify/update Codec server files (e.g. server.tcf, server.cfg, codec.cfg etc)

No: otherwise.

When trying to build the codec server, I get this error - what could be wrong?

ti.sdo.ce.ipc.bios.close(): loading dsplink.dsp

Js: “/…/codec_engine_2_25_01_06/packages/ti/sdo/ce/ipc/bios/package.xs”,
line 123: xdc.services.global.XDCException: XDCException:
xdc.PACKAGE_NOT_FOUND:  /…/dsplink_linux_1_64/dsplink/dsp/package.xdc
found along the package path, but no schema file was found.
Ensure that the package ‘dsplink.dsp’ is completely built.

gmake[1]: *** [package/cfg/bin/cs_x64P.xdl] Error 1
.
.
.

The above error is popped up when the dsplink is not built before building the codec server. The codec server executable is created by linking the dsplink package built for the DSP side. Please follow Building_DSPLink link to build the DSPLINK before building the codec server. From DVSDK 3.10 onwards, the dsplink package can be built from the main DVSDK makefile by executing make dsplink. Please note that to build dsplink package, the linux source needs to be built first, by executing make linux.

How do I create/build/optimize the codec server?

  • Create:
  • Build: Make sure the dsplink is built on the dsp side, before going to building the codec servers. The codec servers can be created and built under Linux or Windows. Please refer to the release notes of the codec server located under cs<CodecServerNumber><PlatformName>_<version> (e.g. cs1omap3530_1_00_01). The most common build errors are discussed under this link.
  • Optimize: After the codec server is created and built with no errors, the performance can be optimized for cache management and DDRALGHEAP sizes.

How do I add a codec to the Codec Server Package?

  • Please follow this link that explains the changes to be done for integration of a codec package to a server package .

How do I remove a codec from the Codec Server Package?

This can be done in two ways.

  • Recreate the codec server: In this method, the codec server is created by running the wizard as described above, excluding the codec that needs to be removed
  • Modify meta data in existing codec server: This requires change in codec.cfg and pacakge.xs files located under \packages\ti\sdo\server\cs directory. As an example, the following steps show how to remove the JPEGDEC codec from the server package:
    • Step 1. remove the following statements from the codec.cfg file.
// Module Config
JPEGDEC.alg.watermark = false;
JPEGDEC.alg.codeSection = "DDR2";
JPEGDEC.alg.udataSection = "DDR2";
JPEGDEC.alg.dataSection = "DDR2";
var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC');
// Server.algs[], the array of algorithms the server supports
{name: "jpegdec", mod: JPEGDEC , threadAttrs: {
   stackMemId: 0, priority: Server.MINPRI + 2},
   groupId: 0,
  },
    • Step 2. remove the following statement from the package.xs file.
validate_one_codec( "ti.sdo.codecs.jpegdec", "JPEGDEC" );

Note: In some earlier versions of the codec server, codec.cfg and package.xs do not exist. In those cases, only server.cfg file may be considered for the suggested changes.

I built the codec server package, where do I see the DSP binary?

The dsp binary gets generated under \packages\ti\sdo\server\cs\bin directory. This location is applicable for production codec servers of the format cs<CodecServerNumber><PlatformName>_<version> (e.g. cs1omap3530_1_00_01). This method is adapted for the codec servers starting from DVSDK 3.0 and DVSDK WinCE 1.0.

The pre-GA DVSDK 3.0 and the DVSDK 2.0 codec servers have a slightly different directory structure layout which is best described in this wiki topic.

What is the purpose of the clockRate variable in the server.tcf, is it used to modify the DSP clock?

The clockRate value does not change the real DSP clock. Setting the wrong clockRate value in server.tcf only affects debug messages from the DSP. The DSP load information remains valid even if this parameter is set to a different value compared to the actual DSP clock rate. If one changes the real DSP clock, it is recommend to match this parameter to the real DSP clock to have accurate debug trace messages.

I changed the clockRate value in server.tcf, how do I make sure it is really set right and taken in the DSP binary?

After changing the clockRate value in server.tcf and re-building the codec server, please refer to the file package/info/bin/(serverName).DataSheet.html inside the server's package. This file is very useful and gives the complete information on the codec server including the Configured DSP Clock Speed.

Pick from the Data Sheet: Cs1omap3530 datasheet html screenshot.png

Are there any docs automatically generated with codec servers?

Yes. See this link for an example.

A server datasheet is generated automatically as part of the build. Key information produced includes: -

  • which codecs are built into the combo
  • which XDM interfaces they implement (IVIDDEC2 or IAUDDEC1 or...)
  • the codec MODULE name (required for invoking the codecs at runtime on the Arm-side)
  • Thread priority - each codec is instantiated in a separate DSP/BIOS TSK thread. Audio should typically run at a higher priority than video for example.

Why are there no codec servers for dm355, dm365?

Because codec servers (aka codec combos) are for SoC environments i.e. Arm-side invokes a DSP-side codec-server. On a device without a DSP this concept is not applicable.

Hence on dm355, dm365 it is purely a collection of codec library binaries with the appropriate interface header files to expose the processing calls and parameter sets.

For more information ...

  1. How do I understand/change the DVEVM memory Map?
  2. What do I need to do if I set TraceUtil on the Arm side to use BIOS logging?
  3. How do I Configure Codec Engine in Arm apps with createFromServer?
  4. How do I debug the DSP side of a CE application on DaVinci using Code Composer Studio?
  5. Where can I get information about codecs in general including where to get them from?
  6. What changes do I make when I integrate new codecs into DVSDK Demonstration application?
  7. DM365 codecs FAQ