Texas Instruments Codec Engine Server manual Controlling I/O Buffer Caching for xDM 0.9 Codecs

Page 27

Creating a Codec Server

2.2.3.1Controlling I/O Buffer Caching for xDM 0.9 Codecs

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. (In xDM 1.0 codecs, this cache management is negotiated automatically.)

To disable management for specific buffers, you need to determine the type of buffer and its number, then set the cache management field for the buffer to "false", as shown in the following example.

The first step is to determine the buffer type. Supported buffer types are: "in" and "out" for both video encoders and video decoders, "recon" (short for reconstruction) for video encoders, and "display" for video decoders.

Next, determine the number of the buffer you want to manage. Buffers are numbered 0 to 15. You're typically looking for buffer number 0 or 1.

Finally, set the buffer's cache management field to "false" as shown in this example:

var H264ENC = xdc.loadModule( "ti.sdo.codecs.h264enc.H264ENC" );

//don't cache-manage inbuf #0: H264ENC.manageInBufsCache[0] = false;

//don't cache-manage outbuf #1: H264ENC.manageOutBufsCache[1] = false;

//don't manage any of the reconstruction buffers:

H264ENC.manageReconBufsCache = [ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ];

The cache management array names are:

For video encoder modules. manageInBufsCache[], manageOutBufsCache[], manageReconBufsCache[], each with elements 0..15.

For video decoder modules. manageInBufsCache[], manageOutBufsCache[], manageDisplayBufsCache[], each with elements 0..15.

Always check with a codec producer first to determine whether it is safe to turn off cache management for certain buffers. When it comes to cache mis-management, things might appear to work on your system for some data and in some configurations, but will not work for other data and configurations (that your customer may use).

Configuring a Codec Server

2-11

Image 27
Contents Codec Engine Server Integrator Users Guide Important Notice Preface Notational Conventions Contents Page This chapter introduces the Codec Engine Topic Codec Engine OverviewWhat is the Codec Engine? Why Should I Use It? Where Does the Codec Engine Fit into My Architecture? Role 3 Core Engine APIsVisa APIs Video Encode Core Engine APIs Visa APIs RuntimeAlgorithm Creator What Are the User Roles?Server Integrator Application Author Engine IntegratorExample Build and Run Instructions Where Can I Get More Information?Configuration Reference Codec Engine API ReferencePage Configuring a Codec Server Overview What is the Execution Flow? What is a Codec Server?Overview What About Single-Processor Systems? What is the Config Kit? What Algorithms Can a Codec Server Integrate?What Examples Exist? Creating a Package Creating a Codec ServerEditing the Package Definition Editing the Codec Server Configuration ScriptVar LogServer = xdc.useModuleti.sdo.ce.bioslog.LogServer Creating a Codec Server Controlling I/O Buffer Caching for xDM 0.9 Codecs Specifying Scratch Group and DMA Resources for a Codec Server.algs.groupId More About the groupId FieldEngine.algs.groupId Editing the DSP/BIOS Configuration ScriptEditing the Build Script 4.1 DSP/BIOS Threads and Module UseEditing the makefile Editing the Linker Command FileDelivering a Codec Server Editing the main.c FileDelivering Server Packages for Servers Built with XDC Delivering a Codec Server Index Index

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.