Performs ADPCM compression of the uniform PCM input.
IppStatus ippsEncode_G726_16s8u (IppsEncoderState_G726_16s* pEncMem , const Ipp16s* pSrc, Ipp8u* pDst, unsigned int len);
pEncMem |
Pointer to the memory buffer that has been initialized for ADPCM encode. |
pSrc |
Pointer to the uniform PCM input speech vector. |
pDst |
Pointer to the ADPCM bit-stream output vector. |
len |
The length of input/output vectors. |
The function ippsEncode_G726 is declared in ippsc.h file. This function performs ADPCM compression of the 14-bit uniform PCM speech input (Recommendation G.726, Annex A) with the bit rate on which the G.726 encoder (with memory pointed to by pEncMem) was initialized to operate. Each byte of the output vector contains ADPCM compressed value of two, three, four, or five binary digits for 16, 24, 32 or 40 Kbit/s bit-rate ADPCM compression, respectively.
The Mu-Law or A-Law PCM input should be expanded to 14-bit uniform PCM prior to ADPCM compression (see Recommendation G.726). This expansion may be done, for example, by first applying the functions ippsMuLawToLin_8u16s or ippsALawToMuLaw_8u16s, which expand 8-bit Mu-Law or A-Law PCM, respectively, into linear 16-bit PCM.
The linear 16-bit PCM input must be shifted two bits to the right (divided by four) to achieve the 14-bit uniform PCM input appropriate for the function ippsEncode_G726.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when one of the specified pointer is NULL. |
ippStsBadArgErr |
Indicates an error when the len is less than or equal to 0. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.