![]() |
![]() |
Opus Library
|
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:
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:
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.
The above limitations can be overridden by recompiling the Opus library with the following defines set.
ALLOW_STEREO
: By default only mono audio is supported. Setting this option allows stereo audio to be supported. ALLOW_NON_20ms
: By default only 20ms frames are supported. Setting this option allows 2.5, 5, 10 and 20ms frames to be supported. ALLOW_FULL_COMPLEXITY
: Default maximum complexity is limited to 3. Setting this option allows complexity settings up to 10 to be supported. ALLOW_FULL_API
: By default the generation of multi-frame packets by the encoder is not supported. Setting this option allows this. DISABLE_FLOAT_API
: By default this option is set. The tonality_analysis, is written using single precision floating point arithmeticThe following define must be set when building for the IAR compiler:
HAS_INTRINSICS_H
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:
ENC_DYN_ALLOC_SIZE
DEC_DYN_ALLOC_SIZE
An example allocation is:
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.
2K Bytes for the CCS tool chain and slightly less for the IAR tool chain in the worst case.
The scratch buffer requirements are: