Texas Instruments Codec Engine Server User Manual
Texas Instruments Codec Engine Server User Manual

Texas Instruments Codec Engine Server User Manual

Texas instruments codec engine server user's guide

Advertisement

Quick Links

Codec Engine Server Integrator
User's Guide
Literature Number: SPRUED5B
September 2007

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Codec Engine Server and is the answer not in the manual?

Questions and answers

Summary of Contents for Texas Instruments Codec Engine Server

  • Page 1 Codec Engine Server Integrator User's Guide Literature Number: SPRUED5B September 2007...
  • Page 2 Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improve- ments, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI's terms and conditions of sale supplied at the time of order acknowledgment.
  • Page 3: About This Book

    About This Book The intended audience for this document is the Server Integrator, who creates a Codec Server for use by the Engine Integrator and thus the Application Author. This manual tells what steps the Server Integrator should take to configure DSP/BIOS and other components to create a Codec Server.
  • Page 4: Notational Conventions

    ❏ This manual uses an icon like the one to the left to identify information Trademarks The Texas Instruments logo and Texas Instruments are registered trademarks of Texas Instruments. Trademarks of Texas Instruments include: TI, DaVinci, XDS, Code Composer, Code Composer Studio,...
  • Page 5: Table Of Contents

    Codec Engine Overview ........... . .1-1 This chapter introduces the Codec Engine.
  • Page 7: Codec Engine Overview

    Chapter 1 Codec Engine Overview This chapter introduces the Codec Engine. Topic Page 1.1 What is the Codec Engine? ....... . 1–2 1.2 Why Should I Use It? .
  • Page 8: What Is The Codec Engine

    What is the Codec Engine? What is the Codec Engine? From the application developer’s perspective, the Codec Engine is a set of APIs that you use to instantiate and run xDAIS algorithms. A VISA interface is provided as well for interacting with xDM-compliant xDAIS algorithms.
  • Page 9: Why Should I Use It

    Why Should I Use It? The Codec Engine is designed to solve some common problems associated with developing system-on-a-chip (SoC) applications. The most significant problems include: ❏ Debugging in a heterogeneous processor environment can be ❏ Different implementations of the same algorithm, such as MP3, have ❏...
  • Page 10: Where Does The Codec Engine Fit Into My Architecture

    Where Does the Codec Engine Fit into My Architecture? Where Does the Codec Engine Fit into My Architecture? The application code (or the middleware it uses) calls the Codec Engine APIs. Within the Codec Engine, the VISA APIs use stubs and skeletons to access the core engine and the actual codecs, which may be local or remote.
  • Page 11 Where Does the Codec Engine Fit into My Architecture? The following figure is a modification of the previous diagram that shows how this architecture is distributed in a GPP+DSP system. In this example, yellow portions run on the GPP, and grey portions run on the DSP.
  • Page 12: What Are The User Roles

    What Are the User Roles? What Are the User Roles? The Codec Engine has several customer use cases, from GPP-side application developers to DSP-side codec authors. Is some cases, these roles may be played by a single person. In other development environments, a different developer may be assigned each role.
  • Page 13: Server Integrator

    1.4.2 Server Integrator To support Engines with remote codecs, a Codec Server must be created. The Codec Server integrates the various components necessary to house the codecs (e.g. DSP/BIOS, Framework Components, link drivers, codecs, Codec Engine, etc.) and generates an executable.
  • Page 14: Engine Integrator

    What Are the User Roles? 1.4.3 Engine Integrator The Engine Integrator defines various Engine configurations. This can include the names of the Engines, as well as the codecs and their names within each Engine, whether each codec is local or remote relative to the application, which groups each codec should be integrated into (for environments which support resource sharing), the name of the Codec Server image if a particular Engine contains remote codecs, etc.
  • Page 15: Where Can I Get More Information

    ❏ Various Codec packages from Algorithm Creators ❏ A Codec Server DSP executable from the Server Integrator if codec ❏ An Engine config file (.cfg) from the Engine Integrator The Application Author write application code, generates output from the Engine configuration file (.c and .xdl output files) using the XDC Tools, compiles the application code and generated files.
  • Page 16 1-10...
  • Page 17: This Chapter Describes How The Server Integrator Should Configure A Codec Server For Use By The

    Configuring a Codec Server This chapter describes how the Server Integrator should configure a Codec Server for use by the Engine Integrator. Topic 2.1 Overview..........2–2 2.2 Creating a Codec Server .
  • Page 18: Overview

    Overview Overview As described in Section 1.4.2, Server Integrator, the Server Integrator provides a Codec Server to the Engine Integrator. In practice, these roles may be shared by one person. There are two configuration steps that the Server Integrator performs: ❏...
  • Page 19: What Is A Codec Server

    2.1.1 What is a Codec Server? A Codec Server is a binary that integrates codecs, framework components, and system code. When the Codec Server is on a DSP, it uses DSP/BIOS as the DSP kernel. In the context of the DaVinci DM644x platforms (and other GPP+DSP platforms), a Codec Server is a DSP binary.
  • Page 20 Overview 2) The application calls the VISA process API (for example, ■ A message queue is created to allow the remote node to receive commands from the GPP. ■ The node-specific "create" AUDENC_create() ) is called to initialize the node state and algorithm-specific memory and resources.
  • Page 21: What About Single-Processor Systems

    3) When processing is complete, the application calls the VISA delete 2.1.3 What About Single-Processor Systems? On systems where there are no "remote" codecs, there is no need to configure a Codec Server. ■ Any algorithm scratch memory is then "deactivated". ■...
  • Page 22: What Algorithms Can A Codec Server Integrate

    Overview 2.1.4 What Algorithms Can a Codec Server Integrate? You can use any algorithm that is xDM-compliant in a Codec Server. In addition, if you want to use a xDAIS-compliant algorithm that is not xDM-compliant, you can first implement your own stubs and skeletons for that algorithm, and then use that algorithm in a Codec Server.
  • Page 23: Creating A Codec Server

    Creating a Codec Server To create a Codec Server, you perform the following configuration steps: ❏ Configure DSP/BIOS through a Tconf script ❏ Configure "the rest" of the components through XDC configuration You will modify the following files: ❏ package.xdc. The package definition file. ❏...
  • Page 24: Editing The Package Definition

    Creating a Codec Server 3) Edit the examples/xdcpaths.mak file with a text editor to specify the 4) Make a duplicate of one of the Codec Server examples in the 2.2.2 Editing the Package Definition The package.xdc file is the package definition file, which defines your Codec Server’s name and its dependencies.
  • Page 25 To see documentation for the attributes of the Server module, follow these steps: 1) Open CE_INSTALL_DIR/xdoc/index.html to see the Configuration Reference. Depending on your browser, you may need to enable active content to view the list of nodes on the left. 2) Click the link to the ti.sdo.ce package.
  • Page 26 Creating a Codec Server /* get various codec modules; i.e. codec implementations */ var SPHDEC_COPY = xdc.useModule('codecs.sphdec_copy.SPHDEC_COPY'); var SPHENC_COPY = xdc.useModule('codecs.sphenc_copy.SPHENC_COPY'); 5) Modify the attributes of the threadAttrs structure as desired. See 6) Specify the algorithms to be available in this Codec Server by Server.algs = [ {name: "viddec_copy", mod: VIDDEC_COPY, threadAttrs: { stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}...
  • Page 27: For Video

    2.2.3.1 The DSP server's support—the "skeletons"—for remote execution of codecs written for xDM 0.9 always manages the cache for all codec I/O buffers exchanged with the ARM application. This can be a performance problem for some video codecs, where the codec accesses the buffers exclusively via DMA, yet the generic skeleton invalidates and flushes those buffers anyway, thus wasting up to a few milliseconds for every frame.
  • Page 28 Creating a Codec Server 2.2.3.2 Codec When you put together several codecs into a single DSP server, you may need to make them share memory and DMA resources. Two codecs can share what is called a "scratch" memory. This is a working memory area, typically in fast internal memory, that is initialized before one frame of data is processed and discarded afterwards.
  • Page 29 Creating a Codec Server How you define the groupId field can affect performance or whether a codec can be created at all. For detailed information on shared scratch memory, see the Framework Components documentation. You may save some time by reading the commentary for the server configuration script in the video_copy example, which is in <CE_install_dir>/examples /ti/sdo/ce/examples/servers/video_copy/video_copy.cfg.
  • Page 30: Editing The Dsp/Bios Configuration Script

    Creating a Codec Server Engine.algs[].groupId For each local algorithm, if the optional groupId field is uninitialized, the algorithm is configured into its own, unique groupId. This is because we don't know what priority the algorithm will run at, so we place it into a unique group to prevent preemption by any other algorithm.
  • Page 31: Editing The Build Script

    Creating a Codec Server 2.2.4.1 DSP/BIOS Threads and Module Use Each “remote” algorithm instance that runs on the DSP executes in a DSP/BIOS thread whose priority is specified by a static configuration parameter (see ti.sdo.ce.Server). The stack size of the thread that runs a “remote”...
  • Page 32: Editing The Linker Command File

    Delivering a Codec Server Change the bold text in the following line to match your server name: var serverName = "my_server"; When you have finished development, you may want to change "debug" in the following line to "release": Pkg.attrs.profile = "release"; Do not edit package.mak, any files that begin with a period, or anything in the "package"...
  • Page 33: Delivering Server Packages For Servers Built With Xdc

    In addition to including the server executable in the server package, you must also add the generated package/info/* files to the package. These files contain information in text form about the codecs included in the server, the server's memory map, and other relevant information. To create a deliverable package, we recommend you use the built-in method in XDC to create a .tar package archive, as shown in the following section.
  • Page 34 Delivering a Codec Server DSP servers built with Configuro do not require a package to build the server itself, but you must create one to produce a server deliverable. In that package, you must include both the server executable and the Configuro-generated "package/info/*"...
  • Page 35 algorithm 2-6 specifying 2-10 Algorithm Creator 1-6, 2-2 all.tcf file 2-14 API Reference 1-9 Application Author 1-8 array 2-11, 2-13, 2-14 Back button 2-9 benefits of Codec Engine 1-3 binary file 2-3 BIOS_ROOT environment variable 2-8 buffer type 2-11 build instructions 2-7 build tools 2-6 build_instructions.html file 1-9 cache 2-11...
  • Page 36 Index link.cmd file 2-7, 2-16 linker commands 2-16 Linux 1-2 local codecs 2-5 main.c file 2-7, 2-16 makefile 2-15, 2-16 middleware 1-4 MINPRI attribute 2-9 name of server 2-16 online help 1-9 package creating 2-7 directory path 2-8 making a copy 2-8 naming 2-8 package directory 2-16 package.bld file 2-7, 2-15...

Table of Contents