AN2261 Freescale Semiconductor / Motorola, AN2261 Datasheet - Page 7

no-image

AN2261

Manufacturer Part Number
AN2261
Description
ITU-T G.729AB Implementation on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
2.1.5 Making the Library Interface ABI-Compliant
2.2 Project-Level Optimizations
The G.729AB library must comply with the Application Binary Interface as specified in [4] and [5].
Example 1 presents the ABI-compliant C functions of the vocoder external interface.
void MDCR_G729AB_encode_initialize(MDCR_G729AB_ENCODER_CHANNEL_INFO_T *enc_info);
Word16 MDCR_G729AB_enableVAD(MDCR_G729AB_ENCODER_CHANNEL_INFO_T *enc_info,
Word16 MDCR_G729AB_getVADStatus(MDCR_G729AB_ENCODER_CHANNEL_INFO_T *enc_info);
void MDCR_G729AB_encode(Word16 *signal,
void MDCR_G729AB_decode_initialize(MDCR_G729AB_DECODER_CHANNEL_INFO_T *dec_info);
void MDCR_G729AB_decode(Word16 *prm,
The functions are as follows:
• MDCR_G729AB_encode_initialize() . Initializes the encoder channel data structures. By
• MDCR_G729AB_enableVAD() . Enables/disables the VAD part of the encoder. If the least
• MDCR_G729AB_getVADStatus() . Returns the current status of the VAD subsystem. Possible
• MDCR_G729AB_encode() . Using either G729 Annex A or G729 Annexes A plus B, this function
• MDCR_G729AB_decode_initialize() . Initializes the decoder channel data structures.
• MDCR_G729AB_decode() . To conform with the G729AB, this function decodes the input frame
The global project optimizations are built upon the ITU-T G.729A optimized implementation,
considerably reducing the work required. The optimizations described in this section apply only to the
new and changed functions integrated from Annex B, as follows:
• Data Precision Format (DPF) operations to speed up the 32-bit operations because the StarCore C
• Alignment of the new data structures added to the channel data.
• Alignment of some vectors and data tables of the new and changed functions to benefit from the
• Use of assembly versions of the functions from the ITU-T G.729A optimized implementation that were
default, the encoder behavior is set to enable the VAD/DTX functionality described in G.729 Annex B.
significant bit of the second parameter is set to 1, the VAD is enabled. The function returns the old
status of the VAD subsystem.
return values are MDCR_G729AB_VAD_DISABLED (VAD is disabled) and
MDCR_G729AB_VAD_ENABLED (VAD is enabled).
encodes the input speech samples in the signal array. The encoder output is provided in the prm[]
vector. The length of the data depends on the input speech type: active speech or silence. The channel
history and data are provided in the enc_info data structure.
parameters in the prm array. The 160-byte decoder output (synthesized data) is provided in the
synth[] vector. The channel history and data are in the dec_info data structure.
compiler provides efficient support for the DPF operations based on intrinsic functions [6].
compiler optimizations when -O3 is used.
unaffected by the integration phase, thus gaining speed and minimizing code size.
Freescale Semiconductor, Inc.
For More Information On This Product,
Example 1. G.79AB Library Interface
Go to: www.freescale.com
Word16 *prm,
MDCR_G729AB_ENCODER_CHANNEL_INFO_T *enc_info);
Word16 *synth,
MDCR_G729AB_DECODER_CHANNEL_INFO_T *dec_info);
IN Word16 flag);
Implementation Process
7

Related parts for AN2261