Codec Engine GenServer Wizard FAQ

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search


  • Image:Google-16x16.png Search for an article here:


Contents

Screenshots

General Questions

What does the wizard do? What does the wizard generate?

The Codec Engine GenServer Wizard generates the files needed to create a Codec Server package that uses 1 or more codecs. This includes:

  • XDC files like package.xdc and package.bld
  • A TCF file (for BIOS 5 RTOS configuration)
  • XDC Configuration scripts (for both server and codec)
  • A C file containing a simple main() implementation
  • config.bld (target configuration file)
  • linker command file
  • makefile (gnu make)

The server is built by running the gmake command after the Wizard has finished generating the necessary files. For more information on Codec Servers, see the Codec Engine Server Integrator User's Guide.

What inputs are required?

Required Inputs:

  • Destination Directory for the server
  • C6000 TI Codegen Tools directory
  • The user must specify one or more codec modules such as those in packages generated by the RTSC Codec Package Wizard. These should be selected from the “Codec Modules” list displayed in Step 1.

Optional Inputs:

  • Platform (e.g. ti.platforms.evmDM6446)
    • If none specified, ti.platforms.evmDM6446 used by default.
  • Server Package Name
    • If none specified, the Wizard will supply a default package name
  • Search Path
    • This is initially the XDCPATH, as specified at startup or read from the environment. It serves two purposes: It is used to search for codecs that populate the “Codec Modules” list in Step 1, and it is set to the XDCPATH in the makefile generated by the wizard. It can be modified with the “Set Search Path” button, and a new list of “Codec Modules” can be generated by clicking “Refresh Codec List”. It is important that the original XDCPATH be persevered in the Package Search Path, and that only repositories that are to be searched for codecs, and repositories that are to be searched when building be added and deleted from the path.
  • Server.algs array for the generated codec configuration script. For each codec module used:
    • Scratch GroupId. Defaults are determined by the type of processing.:
      • Video: 1
      • Imaging: 2
      • Audio/Speech: 3
    • Name. Default is the codec module name in all lower case
    • Thread Priority: Defaults are determined by the type of processing:
      • Video: Server.MINPRI + 1
      • Imaging: ServerMINPRI + 2
      • Audio/Speech: Server.MINPRI + 3
    • Stack size. Initialized to codec defaults
    • StackMemId. Default is 0

What is the difference between the Codec Engine GenServer Wizard and the RTSC Server Package Wizard?

The biggest difference being this Wizard can create a server that uses multiple codecs, also referred to as a server combo. Also:

  • evmOMAPL137 and evmOMAPL138 support has been added
  • You can modify the Package Search Path and search for codecs from within the Wizard
  • You can configure the array of algorithms the server can serve up, Server.algs
  • You can configure the memory map
  • The Codec Engine GenServer Wizard is delivered with Codec Engine

Installation

What software prerequisites exist for using the Wizard?

The Wizard requires other TI tools:

  • Codec Engine 2.20 or greater
  • Codec Engine Tools (found in CE directory) or XDAIS (6.20 or greater) and Framework Components (2.10 or greater)
  • DSP/BIOS 5.32.04 or greater
  • XDC Tools 3.10 or greater

How do I install and run the Wizard?

The Wizard is delivered with Codec Engine.

  • Step 1: Install Codec Engine
  • Step 2: Add the following to your XDCPATH:
    • $(CE_INSTALL_DIR)/packages
These may optionally be added later when the wizard is running by selecting the “Set Search Path” button and adding them to the list.
  • $(CODEC_INSTALL_DIR)/packages - this may be one or more repositories, wherever you have codecs you want to add to the Server
  • $(CE_INSTALL_DIR)/cetools/packages or $(XDAIS_INSTALL_DIR)/packages and $(FC_INSTALL_DIR)/packages
  • $(BIOS_INSTALL_DIR)/packages
  • $(LINK_INSTALL_DIR) - Beginning with CE 2.24, DSP Link was removed from cetools and must be added explicitly.

An example on Linux if using 'full' Codec Engine might be the following (assumes various "INSTALL_DIR" variables have already been set): -

export XDCPATH="$(CE_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/cetools/packages;$(CODEC_INSTALL_DIR)/
packages;$(BIOS_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages"

An alternative is to write a quick Makefile so that you have less to type each time you invoke the wizard. For example: -

#
#  ======== Makefile.ce.genserver ========
#  This makefile is optional - you can use all of it or none of it.
#  Its purpose is to save time/typing when used from the context of the DVSDK.
#  All of the paths are preset in the $(DVSDK_INSTALL_DIR)/Rules.make. The 
#  Codec Engine genserver requires many of these paths hence by setting 
#  the XDCPATH here we save the user some typing and package-path setup.
#  Commands (make goals): -
#  - Start the server wizard
#  [>] make -f Makefile.ce.genserver genserver 
 
# Import Tools Path from Rules.make
include ../Rules.make
 
# Set location of xdc executable
XDC = $(XDC_INSTALL_DIR)/xdc
 
# Set XDCPATH to contain necessary repositories.
# Note that we put specify both CODEC_INSTALL_DIR and CODEC_INSTALL_DIR/packages
# since our config.bld is typically in CODEC_INSTALL_DIR.
 
XDCPATH = $(CODEC_INSTALL_DIR);$(CODEC_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/packages;$(CE_INSTALL_DIR)/cetools/packages;$(BIOS_INSTALL_DIR)/packages;$(LINK_INSTALL_DIR)/packages
 
# Conditionally, you can create verbose build output
XDCOPTIONS=v
 
export XDCOPTIONS
export XDCPATH
 
all: .all-packages
 
.all-packages:
	$(XDC_INSTALL_DIR)/xs ti.sdo.ce.wizards.genserver

You can then type: -

make -f Makefile.ce.genserver

If you do use such a Makefile then you can obviously skip step 3 - because the Makefile will invoke wizard itself.

  • Step 3: Run the Codec Engine GenServer Wizard by executing:
    • $(XDC_INSTALL_DIR)/xs ti.sdo.ce.wizards.genserver

How do I set my XDCPATH?

See this explanation at the RTSC Codec Package Wizard FAQ

Also see the example above.

The XDCPATH is too long to type. Is there another way?

See this explanation at the RTSC Server Package Wizard FAQ

What files are included with the Wizard?

The Wizard consists of the ti.sdo.ce.wizards.genserver package containing XDC files (package.xdc, package.bld, Main.xdc), XDC script files (denoted with extension .xs), templates directory (*.xdt files used to generate XDC files), and a readme.

Running the Wizard

What if I need help on the command line?

See the Codec Engine GenServer Wizard help by: xs ti.sdo.ce.wizards.genserver --help

What if I need help using the GUI version?

Here is a description of the wizard's screens:

Basic Server Information
Basic Server Information
Platform
Select the platform that you wish to build the server for. The platforms currently supported are: evmDM6446, evmDM6467, evm3530, evmOMAPL137 and evmOMAPL138.
Server Package Name
Edit this field to specify the server package name. An example server package name: ti.sdo.servers.viddec_copy
Destination Directory
Browse to the location that the server package files should be output to. For example, if the output repository is c:/output, and the server package name is ti.sdo.servers.viddec_copy, the files will be output to c:/output/ti/sdo/servers/viddec_copy
C6000 TI 'cgtools' Dir
The location of C6000 TI CodeGen tools. The directory above 'bin'
Search Path
The path used to search for codecs that populate the 'Codec Modules' list. Also, the path used to search for dependencies when building the server. Select this button to add and remove directories from the search path. All required directories (code generation, XDAIS, DSP/BIOS, etc.) must be present in this path in order to successfully build the server, unless the "Don't check for build dependencies..." box is checked.
Codec Modules
These are the names of the codec modules you wish to create the server for. The list is initially populated by searching for codecs on the XDCPATH. The codec search path can be modified by clicking the 'Set Search Path' button and specifying directories to search in.
Don't check for build dependencies, I'll modify the generated makefile (e.g. Rules.make users)
When this is checked, the user is expected to supply a rules/paths file. After generating the server, the user then goes into the generated makefile and includes the file. This is for users who already have a file in their development environment with paths defined, and they just want to use that.
Server.algs Array Values
Group Configuration
Group Configuration
To configure values for a group, select the group and enter values in the fields on the right.
To change a group item's id, or delete it if it's empty, right-click on the group name and select from the menu.
To create a new group item, right-click in an empty area of the tree and select 'New group...'
Codec Configuration
Codec Configuration
The default Server.algs array values for a codec can be modified by selecting a codec in the tree on the left and modifying fields on the right.
To reset values to the defaults for the currently selected codec, check the Use Defaults box.
To change the groupId of a codec, right-click on it and select 'Move to group...'. If the groupId selected doesn't exist in the tree, it will be created. A codec can also be dragged and dropped into another group.
For more information on Codec Engine GroupIds, see Codec Engine GroupIds
For more information on DSKT2, see Memory management in XDAIS with DSKT2
Memory Map
Memory Map
Server memory can be configured by unchecking 'Use Defaults', selecting the order of the memory areas, and entering a base address and size for each section. All values must be entered in hexidecimal.
The 'RESET_VECTOR' memory area section needs to start at an even 1Mb, and is fixed at size 0x80.
To have all sections aligned automatically as values are entered, select the 'From top' or 'From bottom' radio button.
When 'From top' is selected, only the starting base address and length fields can be modified. When'From bottom' is selected, only the last address and length fields can be modified.
To restore all values to the defaults initially displayed, check 'Use Defaults'.

What if I am using a platform other than the ones displayed in the Platform drop-down list?

The platforms currently supported are:

  • ti.platforms.evmDM6446
  • ti.platforms.evmDM6467
  • ti.platforms.evm3530
  • ti.platforms.evmOMAPL137
  • ti.platforms.evmOMAPL138

What are the default groupIds and priorities assigned to codecs?

The default values are assigned according to the interface that a codec inherits:

inherits group id   priority
ti.sdo.ce.video.IVIDDEC     0      Server.MINPRI + 1
ti.sdo.ce.video.IVIDENC     0      Server.MINPRI + 1
ti.sdo.ce.video1.IVIDDEC1     0      Server.MINPRI + 1
ti.sdo.ce.video1.IVIDENC1     0      Server.MINPRI + 1
ti.sdo.ce.video2.IVIDDEC2     0      Server.MINPRI + 1
ti.sdo.ce.video2.split.IVIDDEC2BACK     0      Server.MINPRI + 1
ti.sdo.ce.video2.split.IVIDDEC2FRONT     0      Server.MINPRI + 1
ti.sdo.ce.image1.IIMGDEC1     1      Server.MINPRI + 2
ti.sdo.ce.image1.IIMGENC1     1      Server.MINPRI + 2
ti.sdo.ce.image.IIMGDEC     1      Server.MINPRI + 2
ti.sdo.ce.image.IIMGENC     1      Server.MINPRI + 2
ti.sdo.ce.audio.IAUDDEC     2      Server.MINPRI + 3
ti.sdo.ce.audio.IAUDENC     2      Server.MINPRI + 3
ti.sdo.ce.audio1.IAUDDEC1     2      Server.MINPRI + 3
ti.sdo.ce.audio1.IAUDENC1     2      Server.MINPRI + 3
ti.sdo.ce.speech.ISPHDEC     2      Server.MINPRI + 3
ti.sdo.ce.speech.ISPHENC     2      Server.MINPRI + 3
ti.sdo.ce.speech1.ISPHDEC1     2      Server.MINPRI + 3
ti.sdo.ce.speech1.ISPHENC1     2      Server.MINPRI + 3
ti.sdo.ce.IUNIVERSAL     2      Server.MINPRI + 1
ti.sdo.ce.IVIDANALYTICS     2      Server.MINPRI + 1
ti.sdo.ce.IVIDTRANSCODE     2      Server.MINPRI + 1

This addresses: SDOCM00057124 genserver wizard generates wrong groupId values. It is available in Codec Engine 2.24.

Improving performance on the generated servers

See this explanation at the RTSC Codec Package Wizard FAQ

After the Wizard

What do I need to do after the wizard has successfully output the files needed?

  • After generating files using the RTSC Server Package Wizard, edit codec.cfg. Assign values to any settings that are undefined:
    • Example:
      • Original line: VIDDEC_COPY.alg.codeSection = undefined;
      • Modified line: VIDDEC_COPY.alg.codeSection = "DDR2";
      • Don't forget the quotes!

How do I build my Server?

  • Run gmake all to generate the server executable from the output directory (output directory + server.package.name.with.dots.turned.into.forward.slashes).
  • Note:
    • The following product directories must be defined in the generated makefile to build a server:
      • $(CE_INSTALL_DIR)
      • $(CE_INSTALL_DIR)/cetools or $(XDAIS_INSTALL_DIR)/packages and $(FC_INSTALL_DIR)/packages
      • $(BIOS_INSTALL_DIR)
      • $(LINK_INSTALL_DIR)
These directories can be added to the generated makefile by selecting the “Set Search Path” button and adding them to the list, or they can be defined in an external file that can be included in the generated makefile after the server is generated.

Other Questions

Does the wizard run the same way on both Windows and Linux?

Yes, the wizard behaves the exact same way on both Windows and Linux.

This topic describes how to build codec combos in Windows (since codec-combos run on the DSP they are completely agnostic to the GPP OS. The same codec combo can be reused in Linux, WinCE GPP environments etc)

Ok. Now I have a codec-combo. Then what?

Testing it would probably be wise!

There are a whole suite of sample apps in DMAI that can be used to (unit) test a codec-combo e.g. you could use apps/audio_decode_io1 to test all of the IAUDDEC1 based audio decoders in your codec-combo.

Other FAQs

Other RTSC Codec Package Wizard Info


For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Codec Engine GenServer Wizard FAQ here.
Leave a Comment
Personal tools