Creating a Codec Server

2.2.3.2Specifying "Scratch Group" and DMA Resources for a

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. The codecs can share this memory only if they run at the same priority. That is, one cannot preempt another and thus destroy the other codec's scratch area in the middle of its work.

Scratch area sharing is managed by the DSP algorithm memory manager called DSKT2, but you can affect how it manages the scratch areas by defining the optional groupId field for each algorithm in the array of Server.algs[] configuration.

If you do not set the groupId field, no sharing will take place. This is fine if you have enough internal/external memory. Otherwise, you can set it per algorithm, as is the case in the video_copy server example:

/* The array of algorithms this server can serve up.

*This array also configures details about the threads

*that will be created to run the algorithms

*(e.g. stack sizes, priorities, etc.). */

Server.algs = [

 

{

 

name:

"viddec_copy", // C name for the of codec

mod:

VIDDEC_COPY, // VIDDEC_COPY defined above

threadAttrs: {

stackMemId:

0, // BIOS MEM seg ID for task stack

priority:

Server.MINPRI + 1

// task priority

},

 

 

 

groupId:

0,

// scratch group ID (see DSKT2 below)

},

 

 

 

{

 

 

 

name:

"videnc_copy",

 

mod:

VIDENC_COPY,

 

threadAttrs: {

stackMemId: 0,

priority: Server.MINPRI + 1

},

groupId: 0,

},

];

2-12

Page 28
Image 28
Texas Instruments Codec Engine Server manual Specifying Scratch Group and DMA Resources for a Codec

Codec Engine Server specifications

Texas Instruments Codec Engine Server (CES) is a powerful software framework designed to handle audio and video processing on embedded systems. It serves as a bridge between high-level application programming and low-level codec implementations, simplifying the development of multimedia applications. The Codec Engine's primary focus is on optimizing media codecs for applications such as telecommunications, video conferencing, multimedia playback, and streaming services.

One of the standout features of the CES is its ability to support multiple codecs simultaneously, allowing developers to efficiently decode and encode various media formats in real time. This flexibility is crucial for applications that demand high-quality audio and video processing without compromising performance. Furthermore, the CES architecture promotes modular design, enabling developers to swap in and out different codec implementations based on specific project requirements.

The CES leverages advanced technologies including simultaneous multithreading, which maximizes the processing power of multi-core processors. With this capability, developers can allocate threads efficiently across multiple cores, tackling demanding tasks without latency. Additionally, the framework supports dynamic codec allocation, meaning that resources can be managed and adjusted on-the-fly as needed, ensuring optimal performance in varying conditions.

Another significant characteristic of the CES is its compatibility with various Texas Instruments DSP (Digital Signal Processor) platforms. This ensures that developers can take advantage of the specialized capabilities of TI's hardware, including their power management features and high-performance processing capabilities. The integration of hardware and software within the CES architecture allows for optimized resource utilization, leading to energy-efficient applications.

The development process is further streamlined through the use of a comprehensive API (Application Programming Interface) that provides access to codec functionalities while abstracting the complexities of underlying hardware. This allows developers to focus on building high-level features without getting bogged down in low-level programming details.

In conclusion, Texas Instruments Codec Engine Server stands out as a robust solution for developers aiming to create high-performance media applications. Its support for multiple codecs, efficient resource management, and compatibility with TI DSP platforms make it an indispensable tool in the multimedia processing space. By facilitating seamless interaction between hardware and software, CES empowers developers to deliver richer multimedia experiences in their applications.