Creating a Codec Server

For example, these statements from the video_copy.cfg file have been modified (bold text) to reference the speech encoder/decoder.

/* 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 CE_INSTALL_DIR/xdoc/index.html for details about these attributes.

Server.threadAttrs.stackSize = 2048;

Server.threadAttrs.priority = Server.MINPRI;

These settings configure the Server thread, which is used to create and delete codecs as well as to support requests for dynamic resource usage. We recommend that you use Server.MINPRI so you don’t preempt real-time threads.

6)Specify the algorithms to be available in this Codec Server by modifying the Server.algs array. For example, statements from the video_copy.cfg file have been added and modified (bold text) to reference the speech encoder/decoder and to give audio processing a higher priority than video processing.

Server.algs = [

{name: "viddec_copy", mod: VIDDEC_COPY, threadAttrs: { stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}

},

{name: "videnc_copy", mod: VIDENC_COPY, threadAttrs: { stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}

},

{name: "sphdec_copy", mod: SPHDEC_COPY, threadAttrs: { stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 2}

},

{name: "sphenc_copy", mod: SPHENC_COPY, threadAttrs: { stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 2}

},

];

7)The example *.cfg files also configure the ti.sdo.fc.dskt2.DSKT2 and ti.sdo.fc.dman3.DMAN3 modules, which are part of Framework Components. DSKT2 is the xDAIS algorithm memory allocation manager, and DMAN3 is the DMA manager. See the Framework Components documentation in CE_INSTALL_DIR/xdoc/index.html for details on configuring these modules.

2-10

Page 26
Image 26
Texas Instruments Codec Engine Server manual Creating a Codec Server

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.