Opus Library
Opus

The Opus codec is designed for interactive speech and audio transmission over the Internet. It is designed by the IETF Codec Working Group and incorporates technology from Skype's SILK codec and Xiph.Org's CELT codec.

The Opus codec is designed to handle a wide range of interactive audio applications, including Voice over IP, videoconferencing, in-game chat, and even remote live music performances. It can scale from low bit-rate narrowband speech to very high quality stereo music. Its main features are:

Documentation sections:

Changes for TI SimpleLink Implementation

In order to support SimpleLink devices, the TI optimized implementation only supports the CELT codec. Anything relating to SILK and HYBRID modes is unsupported. The original implementation and documentation can be found at the Opus Codec website.

Additionally, optional build options further reduce the functionality to:

Benchmarks for the TI SimpleLink Implementation

The benchmarks below are based on mono, 16kHz, encoder level 3 complexity:

The memory figures are for the CCS tool chain v7.4 with optimization for code size. The MCPs were measured using CC26x2R1 LaunchPad plus CC3200AUDBOOST hardware using real time audio.

Build settings

The above limitations can be overridden by recompiling the Opus library with the following defines set.

Warning
Doing so should be considered experimental and untested:

The following define must be set when building for the IAR compiler:

Memory Usage and Scratch Buffer

Temporary memory requirements are split between the normal C stack and a temporary scratch area. The scratch area can be malloc'd and free'd each frame (external to the codec) or allocated once on start-up.s The encoder and decoder have different scratch requirements and the encoder's requirement is build option dependent.

The following constants are given in this header file:

An example allocation is:

int32_t *Scratch_Buffer;
Scratch_Buffer = malloc(ENC_DYN_ALLOC_SIZE*sizeof(int32_t);

The decoder's scratch area can be aliased to the encoder's since the encoder always has a larger requirement, assuming the encoder and decoder are not run concurrently.

This partitioning was performed in order to reduce the stack requirements, it does not however reduce the total memory requirement particularly if the scratch allocation is done on start-up and there are periods when neither encoder/decoder are running.

Runtime stack requirement

2K Bytes for the CCS tool chain and slightly less for the IAR tool chain in the worst case.

Scratch buffer size requirement

The scratch buffer requirements are:

© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale