The QNX Codec Engine for OMAP3530 is a codec engine created to support QNX multimedia applications on OMAP3530 (Beagle) platforms, providing accelerated decoding for AAC, MP3 and WMA audio media formats.
It is delivered as binaries and as source. The binaries provide a working example for demonstration in a pre-defined configuration. The source can be used to modify the configuration provided in the binary delivery. This technote includes the following sections:
The Codec Engine directory includes the following four package repositories (directories):
In addition, to allow use of the QNX OSAL and IPC, some RTSC script changes have been made in codec_engine_2_22/packages/ti/sdo/ce.
The binaries for the QNX Codec Engine for OMAP3530 can be downloaded from the QNX download site, at http://www.qnx.com/download/.
This technote section describes:
This section lists the components that are included in the pre-built QNX Codec Engine for OMAP3530 (binaries delivery).
The Codec Engine components include:
The MME components included in the pre-built Codec Engine are the following io-media filters for audio decoding on the OMAP3530 platform:
This filter is located under lib/mmedia/filters/decoders/.
To configure and run the Codec Engine on an OMAP3530 Beagle target, complete the following tasks in sequence:
startup-omap3530 -L 0x87E00000,0x200000 -x 0x85800000,0x02600000 -v -p
# cp ce_audio_decoder.so path/armle/lib/dll/mmedia
# cp decodeCombo.x64P /tmp
# dsplink160 -q # ce_loader
For more information about io-media, see the MME Utilities Reference.
After you have installed and configured the Codec Engine, you need to:
To configure io-media to use the DSP decoder, change the io-media configuration file as shown below.
In the mmf_graphbuilder module configuration section:
module-options { module = "mmf_graphbuilder"
change:
format { url = "*.mov" parser = "mp4_parser" decoder = "qnx_raac_decoder" } format { url = "*.mp[a123]" parser = "mpega_parser" decoder = "xing_mpega_decoder" # You can set MMF graph-level parameters here: # graphparam { # name = "foo" # value = "bar" # } } format { url = "*.mp4" parser = "mp4_parser" decoder = "qnx_raac_decoder" } format { url = "*.m4a" parser = "mp4_parser" decoder = "qnx_raac_decoder" } format { url = "*.aac" parser = "aac_parser" decoder = "qnx_raac_decoder" } format { url = "*.wma" parser = "wma9_parser" decoder = "wma9_decoder" }
to:
format { url = "*.mov" parser = "mp4_parser" decoder = "ce_audio_decoder" } format { url = "*.mp[a123]" parser = "mpega_parser" decoder = "ce_audio_decoder" # You can set MMF graph-level parameters here: # graphparam { # name = "foo" # value = "bar" # } } format { url = "*.mp4" parser = "mp4_parser" decoder = "ce_audio_decoder" } format { url = "*.m4a" parser = "mp4_parser" decoder = "ce_audio_decoder" } format { url = "*.aac" parser = "aac_parser" decoder = "ce_audio_decoder" } format { url = "*.wma" parser = "wma9_parser" decoder = "ce_audio_decoder" }
To significantly reduce the time between track changes, you should also configure io-media to keep the ce_audio_decoder DLLs resident.
In the mmf module configuration section:
module-options { module = "mmf"
Add the following to keep the DLLs resident:
keepdll { name = "ce_audio_decoder" optional = yes }
This section presents a brief description of how to build and port the Codec Engine Version 2.22 for an OMAP3530 platform. The ported Codec Engine uses the QNX-ported DSP/BIOS Link (dsplink version 1.61) as the transport between the GPP and the DSP.
![]() |
To modify the Codec Engine source you will need to obtain some proprietary tools, such as the TI Code Composer Studio; TI codecs, and relevant licences. Please contact QNX for more information. |
Before building the Codec Engine, you need to have a correctly built QNX-ported dsplink, which is available from QNX in a separate package.
To build the QNX-ported dsplink you need:
![]() |
For more information, or to obtain the Texas Instruments tools, see the Texas Instruments site at:
http://focus.ti.com/dsp/docs/dspsupportaut.tsp?familyId=44§ionId=3&tabId=416&toolTypeId=30 |
Building the Codec Engine for QNX requires three tasks:
Detailed instructions for building the component parts of the Codec Engine are provided below. As a general rule:
The first time you build the Codec Engine, you should perform the following tasks and build the packages in the following sequence:
![]() |
|
To set up the environment variables for the Codec Engine:
$ . ./setbuildenv.sh
To build the QNX-ported dsplink:
You don't need to change anything to build the target package; simply:
However, if you want to change the compiler, you need to make some changes; for example, change the GCArmv5T.XDC file.
To build the Codec Engine primary library, you need to:
To set the paths and the environment variables:
![]() |
If you are not building the DSP side of the image or changing the compiler version, you should not have to change anything in the files listed above. Nevertheless, it is a good idea to review their content to confirm that nothing needs to be changed. |
A standard build does not require a build of the DSP side of the image (codecs and servers). However, if you want to build the DSP side of the image, you need to edit the user.bld file. For example:
"DSP": [{doBuild: true, // DSP builds (DSP servers) // Specify the "root directory" for the compiler tools. // NOTE: make sure the directory you specify has a "bin" subdirectory cgtoolsRootDir: "C:/CCStudio_v3.3/cg6x_6_0_15",
To build the primary packages:
Currently, the codec engine only needs the trace module from this package. To build this module:
To build the dsplink client library package:
Currently, there is nothing you need to do for the power package. Power control for the OMAP3530 platform is done in dsplink, and the separate power package provided is a dummy implementation of the power interface, already built.
The ipc/dsplink package provides the glue layer between dsplink and the Codec Engine.
To build the ipc/dsplink package:
If you do need to change a path or environment variable, follow the procedure as you did to build the Codec Engine primary library.
To build the CMEM package:
![]() |
|
The default memory that needs to be reserved for CMEM is defined in cmem_module.c, as follows:
#define BLOCK_0_ADDR 0x85800000 //start physical address of the CMEM #define BLOCK_0_SIZE 0x1000000 //size of the CMEM.
And the default pool block allocation is as follows:
/*default pool block allocation*/ static int pools[NBLOCKS][MAX_POOLS][2] = { { {20,4096}, //number of blocks and block size {8,131072}, {5,1048576}, {1,1429440}, {1,256000}, {1,3600000}, {5,829440}, }, };
To customize the CMEM parameters, use the environment variable CMEM_PARAMETERS by specifying, as follows:
For example:
export CMEM_PARAMETERS=0x85800000,0x10000000,20,4096,8,131072,5,1048576,1,1429440,1,256000,1,3600000,5,829440
![]() |
If you customize the CMEM parameters, you must export the CMEM_PARAMETERS environment variable before you start the Codec Engine related components. |
To build the codecs and codec servers:
The generated decoder server DSP image will be: decodeCombo.x64P, in the omap3530_dvsdk_combos_3_16/packages/ti/sdo/servers/decode/ directory.
If you have a non-watermarked version of the package from TI, before building you can edit the XDCARGS option in the Makefile for building the server to make either a production or an evaluation server:
Building the shim layer is the final step in building the codec engine.
![]() |
|
To build the shim layer:
By default, the shim layer looks for the DSP image on the running target system at /tmp/decodeCombo.x64P.
To change this default, modify the cebuild.cfg file in the qnx_packages/codec_engine/nto/arm/so.le directory as follows:
var myEngine = Engine.createFromServer( //creating audio dec server "audiodec", "./decodeCombo.x64P", "ti.sdo.servers.decode" ); myEngine.server = "/tmp/decodeCombo.x64P"
where:
The codecs server is like a codec container that includes all the codecs you want to have in the generate DSP image. To customize the image, you can:
To change the memory allocation, you need to change the memory map. The memory map is in the decode.tcf file in the combos_3_16/packages/ti/sdo/servers/decode directory.
For instructions on how to set up and customize the memory map, refer to decode_combo_datasheet.pdf which can be found in the omap3530_dvsdk_combos_3_16/packages/ti/sdo/servers/decode/docs directory. This document includes all the information you will need about the memory map used in the codec server.
The codec server's memory regions are used by either the GPP or the DSP, or are shared by both the GPP and the DSP. For more information about CMEM, refer to the “CMEM Overview” on the Texas Instruments Developer Wiki at http://wiki.davincidsp.com/index.php?title=CMEM_Overview.
You should also check with Texas Instruments to find out how much memory each codec requires.
You need to reserve the memory region used by dsplink and the DSP codec server in the BSP startup, in order to prevent the kernel from allocating the required memory region for another use.
To reserve the memory, specify command-line arguments in the BSP startup; for example:
startup-omap3530 -L 0x87E00000,0x200000 -x 0x85800000,0x02600000
where:
You can customize all the above parameters, but it is best not to leave gaps between the allocated memory regions. You should also make sure the startup commands and the .tcf file are consistent.
© 2009, QNX Software Systems GmbH & Co. KG. All rights reserved.
Published under license by:
QNX Software Systems International CorporationQNX, Neutrino, Photon, Photon microGUI, Momentics, and Aviage are trademarks, registered in certain jurisdictions, of QNX Software Systems GmbH & Co. KG. and are used under license by QNX Software Systems International Corporation. All other trademarks belong to their respective owners.