Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

G711ulaw to G729 conversion and vice versa

yadhunandhanv
Beginner
682 Views
Hi,

i am writing an application to covert g711ulaw to g729 format. and vice versa using IPP libraries.

i am bit confused about the PCM input size of the g711ulaw Encoder and output size of the g711law decoder.

what is the size of input PCM should i feed to get g711uLaw Encoder if i am using these functions?

extern USC_Fxns USC_G711U_Fxns;
USC_Gxxx_Fnxs->Encode
USC_Gxxx_Fnxs->Decode

1) currently i am assuming that the g711ulw encoder requires 14 bit PCM input and decoder gives 14 bit PCM output.

This is to be left shifted to get 16 bit PCM which can be fed to G729 encoder (as it requires 16 bit PCM)..

In the reverse way the decoder ouput of G729 is to be shifted to right to get 14 bit PCM which in turn can be fed to G711u Encoder.

Are my above assumptions correct ?

please help me out

Thanks


0 Kudos
1 Reply
Jeffrey_M_Intel1
Employee
682 Views

The usc_speech_codec sample simply calls the IPP companding functions for g.711 (when there is no voice activity detection). The 16s variants of the companding routines work over the entire 16s range. Some speech coding functions are limited to 14 bits but not those related to g.711. I tested 16 bit PCM input/output with G.711 and G729 and could not see any problems in theory lower bit depths should work too.

From my simple tests with usc_speech_codec.exe it does not look like the left and right shifts of PCM data are necessary to transcode from one format to another at least as implemented in this sample. My tests went through a .wav file intermediate step for the transcode, which is not exactly like your scenario, but my non-audio-expert ears did not detect any overall loss or gain in the signal as one would expect if these shifts were required.

If your tests show that weve somehow missed a part of one of the speech codec specs in this sample please let us know. Otherwise, the usc_speech_codec code may be helpful as a reference as you get started with USC.

Regards,

Jeff

0 Kudos
Reply