WebRtc_Word32 => int32_t etc. in audio_coding/
BUG=314 Review URL: https://webrtc-codereview.appspot.com/1271006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3789 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -25,9 +25,9 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_EncoderAssign(iLBC_encinst_t **iLBC_encinst, WebRtc_Word16 *ILBCENC_inst_Addr, WebRtc_Word16 *size) {
|
||||
int16_t WebRtcIlbcfix_EncoderAssign(iLBC_encinst_t **iLBC_encinst, int16_t *ILBCENC_inst_Addr, int16_t *size) {
|
||||
*iLBC_encinst=(iLBC_encinst_t*)ILBCENC_inst_Addr;
|
||||
*size=sizeof(iLBC_Enc_Inst_t)/sizeof(WebRtc_Word16);
|
||||
*size=sizeof(iLBC_Enc_Inst_t)/sizeof(int16_t);
|
||||
if (*iLBC_encinst!=NULL) {
|
||||
return(0);
|
||||
} else {
|
||||
@ -35,9 +35,9 @@ WebRtc_Word16 WebRtcIlbcfix_EncoderAssign(iLBC_encinst_t **iLBC_encinst, WebRtc_
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_DecoderAssign(iLBC_decinst_t **iLBC_decinst, WebRtc_Word16 *ILBCDEC_inst_Addr, WebRtc_Word16 *size) {
|
||||
int16_t WebRtcIlbcfix_DecoderAssign(iLBC_decinst_t **iLBC_decinst, int16_t *ILBCDEC_inst_Addr, int16_t *size) {
|
||||
*iLBC_decinst=(iLBC_decinst_t*)ILBCDEC_inst_Addr;
|
||||
*size=sizeof(iLBC_Dec_Inst_t)/sizeof(WebRtc_Word16);
|
||||
*size=sizeof(iLBC_Dec_Inst_t)/sizeof(int16_t);
|
||||
if (*iLBC_decinst!=NULL) {
|
||||
return(0);
|
||||
} else {
|
||||
@ -45,7 +45,7 @@ WebRtc_Word16 WebRtcIlbcfix_DecoderAssign(iLBC_decinst_t **iLBC_decinst, WebRtc_
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_EncoderCreate(iLBC_encinst_t **iLBC_encinst) {
|
||||
int16_t WebRtcIlbcfix_EncoderCreate(iLBC_encinst_t **iLBC_encinst) {
|
||||
*iLBC_encinst=(iLBC_encinst_t*)malloc(sizeof(iLBC_Enc_Inst_t));
|
||||
if (*iLBC_encinst!=NULL) {
|
||||
WebRtcSpl_Init();
|
||||
@ -55,7 +55,7 @@ WebRtc_Word16 WebRtcIlbcfix_EncoderCreate(iLBC_encinst_t **iLBC_encinst) {
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_DecoderCreate(iLBC_decinst_t **iLBC_decinst) {
|
||||
int16_t WebRtcIlbcfix_DecoderCreate(iLBC_decinst_t **iLBC_decinst) {
|
||||
*iLBC_decinst=(iLBC_decinst_t*)malloc(sizeof(iLBC_Dec_Inst_t));
|
||||
if (*iLBC_decinst!=NULL) {
|
||||
WebRtcSpl_Init();
|
||||
@ -65,18 +65,18 @@ WebRtc_Word16 WebRtcIlbcfix_DecoderCreate(iLBC_decinst_t **iLBC_decinst) {
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_EncoderFree(iLBC_encinst_t *iLBC_encinst) {
|
||||
int16_t WebRtcIlbcfix_EncoderFree(iLBC_encinst_t *iLBC_encinst) {
|
||||
free(iLBC_encinst);
|
||||
return(0);
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_DecoderFree(iLBC_decinst_t *iLBC_decinst) {
|
||||
int16_t WebRtcIlbcfix_DecoderFree(iLBC_decinst_t *iLBC_decinst) {
|
||||
free(iLBC_decinst);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_EncoderInit(iLBC_encinst_t *iLBCenc_inst, WebRtc_Word16 mode)
|
||||
int16_t WebRtcIlbcfix_EncoderInit(iLBC_encinst_t *iLBCenc_inst, int16_t mode)
|
||||
{
|
||||
if ((mode==20)||(mode==30)) {
|
||||
WebRtcIlbcfix_InitEncode((iLBC_Enc_Inst_t*) iLBCenc_inst, mode);
|
||||
@ -86,10 +86,10 @@ WebRtc_Word16 WebRtcIlbcfix_EncoderInit(iLBC_encinst_t *iLBCenc_inst, WebRtc_Wor
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const WebRtc_Word16 *speechIn, WebRtc_Word16 len, WebRtc_Word16 *encoded) {
|
||||
int16_t WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const int16_t *speechIn, int16_t len, int16_t *encoded) {
|
||||
|
||||
WebRtc_Word16 pos = 0;
|
||||
WebRtc_Word16 encpos = 0;
|
||||
int16_t pos = 0;
|
||||
int16_t encpos = 0;
|
||||
|
||||
if ((len != ((iLBC_Enc_Inst_t*)iLBCenc_inst)->blockl) &&
|
||||
#ifdef SPLIT_10MS
|
||||
@ -104,7 +104,7 @@ WebRtc_Word16 WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const WebRtc_Wo
|
||||
|
||||
/* call encoder */
|
||||
while (pos<len) {
|
||||
WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) &encoded[encpos], &speechIn[pos], (iLBC_Enc_Inst_t*) iLBCenc_inst);
|
||||
WebRtcIlbcfix_EncodeImpl((uint16_t*) &encoded[encpos], &speechIn[pos], (iLBC_Enc_Inst_t*) iLBCenc_inst);
|
||||
#ifdef SPLIT_10MS
|
||||
pos += 80;
|
||||
if(((iLBC_Enc_Inst_t*)iLBCenc_inst)->section == 0)
|
||||
@ -117,7 +117,7 @@ WebRtc_Word16 WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const WebRtc_Wo
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_DecoderInit(iLBC_decinst_t *iLBCdec_inst, WebRtc_Word16 mode) {
|
||||
int16_t WebRtcIlbcfix_DecoderInit(iLBC_decinst_t *iLBCdec_inst, int16_t mode) {
|
||||
if ((mode==20)||(mode==30)) {
|
||||
WebRtcIlbcfix_InitDecode((iLBC_Dec_Inst_t*) iLBCdec_inst, mode, 1);
|
||||
return(0);
|
||||
@ -125,21 +125,21 @@ WebRtc_Word16 WebRtcIlbcfix_DecoderInit(iLBC_decinst_t *iLBCdec_inst, WebRtc_Wor
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
WebRtc_Word16 WebRtcIlbcfix_DecoderInit20Ms(iLBC_decinst_t *iLBCdec_inst) {
|
||||
int16_t WebRtcIlbcfix_DecoderInit20Ms(iLBC_decinst_t *iLBCdec_inst) {
|
||||
WebRtcIlbcfix_InitDecode((iLBC_Dec_Inst_t*) iLBCdec_inst, 20, 1);
|
||||
return(0);
|
||||
}
|
||||
WebRtc_Word16 WebRtcIlbcfix_Decoderinit30Ms(iLBC_decinst_t *iLBCdec_inst) {
|
||||
int16_t WebRtcIlbcfix_Decoderinit30Ms(iLBC_decinst_t *iLBCdec_inst) {
|
||||
WebRtcIlbcfix_InitDecode((iLBC_Dec_Inst_t*) iLBCdec_inst, 30, 1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_Decode(iLBC_decinst_t *iLBCdec_inst,
|
||||
const WebRtc_Word16 *encoded,
|
||||
WebRtc_Word16 len,
|
||||
WebRtc_Word16 *decoded,
|
||||
WebRtc_Word16 *speechType)
|
||||
int16_t WebRtcIlbcfix_Decode(iLBC_decinst_t *iLBCdec_inst,
|
||||
const int16_t *encoded,
|
||||
int16_t len,
|
||||
int16_t *decoded,
|
||||
int16_t *speechType)
|
||||
{
|
||||
int i=0;
|
||||
/* Allow for automatic switching between the frame sizes
|
||||
@ -172,7 +172,7 @@ WebRtc_Word16 WebRtcIlbcfix_Decode(iLBC_decinst_t *iLBCdec_inst,
|
||||
}
|
||||
|
||||
while ((i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)<len) {
|
||||
WebRtcIlbcfix_DecodeImpl(&decoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl], (const WebRtc_UWord16*) &encoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_words], (iLBC_Dec_Inst_t*) iLBCdec_inst, 1);
|
||||
WebRtcIlbcfix_DecodeImpl(&decoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl], (const uint16_t*) &encoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_words], (iLBC_Dec_Inst_t*) iLBCdec_inst, 1);
|
||||
i++;
|
||||
}
|
||||
/* iLBC does not support VAD/CNG yet */
|
||||
@ -180,11 +180,11 @@ WebRtc_Word16 WebRtcIlbcfix_Decode(iLBC_decinst_t *iLBCdec_inst,
|
||||
return(i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl);
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_Decode20Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
const WebRtc_Word16 *encoded,
|
||||
WebRtc_Word16 len,
|
||||
WebRtc_Word16 *decoded,
|
||||
WebRtc_Word16 *speechType)
|
||||
int16_t WebRtcIlbcfix_Decode20Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
const int16_t *encoded,
|
||||
int16_t len,
|
||||
int16_t *decoded,
|
||||
int16_t *speechType)
|
||||
{
|
||||
int i=0;
|
||||
if ((len==((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)||
|
||||
@ -196,7 +196,7 @@ WebRtc_Word16 WebRtcIlbcfix_Decode20Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
}
|
||||
|
||||
while ((i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)<len) {
|
||||
WebRtcIlbcfix_DecodeImpl(&decoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl], (const WebRtc_UWord16*) &encoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_words], (iLBC_Dec_Inst_t*) iLBCdec_inst, 1);
|
||||
WebRtcIlbcfix_DecodeImpl(&decoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl], (const uint16_t*) &encoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_words], (iLBC_Dec_Inst_t*) iLBCdec_inst, 1);
|
||||
i++;
|
||||
}
|
||||
/* iLBC does not support VAD/CNG yet */
|
||||
@ -204,11 +204,11 @@ WebRtc_Word16 WebRtcIlbcfix_Decode20Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
return(i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl);
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_Decode30Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
const WebRtc_Word16 *encoded,
|
||||
WebRtc_Word16 len,
|
||||
WebRtc_Word16 *decoded,
|
||||
WebRtc_Word16 *speechType)
|
||||
int16_t WebRtcIlbcfix_Decode30Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
const int16_t *encoded,
|
||||
int16_t len,
|
||||
int16_t *decoded,
|
||||
int16_t *speechType)
|
||||
{
|
||||
int i=0;
|
||||
if ((len==((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)||
|
||||
@ -220,7 +220,7 @@ WebRtc_Word16 WebRtcIlbcfix_Decode30Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
}
|
||||
|
||||
while ((i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)<len) {
|
||||
WebRtcIlbcfix_DecodeImpl(&decoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl], (const WebRtc_UWord16*) &encoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_words], (iLBC_Dec_Inst_t*) iLBCdec_inst, 1);
|
||||
WebRtcIlbcfix_DecodeImpl(&decoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl], (const uint16_t*) &encoded[i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_words], (iLBC_Dec_Inst_t*) iLBCdec_inst, 1);
|
||||
i++;
|
||||
}
|
||||
/* iLBC does not support VAD/CNG yet */
|
||||
@ -228,9 +228,9 @@ WebRtc_Word16 WebRtcIlbcfix_Decode30Ms(iLBC_decinst_t *iLBCdec_inst,
|
||||
return(i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl);
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_DecodePlc(iLBC_decinst_t *iLBCdec_inst, WebRtc_Word16 *decoded, WebRtc_Word16 noOfLostFrames) {
|
||||
int16_t WebRtcIlbcfix_DecodePlc(iLBC_decinst_t *iLBCdec_inst, int16_t *decoded, int16_t noOfLostFrames) {
|
||||
int i;
|
||||
WebRtc_UWord16 dummy;
|
||||
uint16_t dummy;
|
||||
|
||||
for (i=0;i<noOfLostFrames;i++) {
|
||||
/* call decoder */
|
||||
@ -239,7 +239,7 @@ WebRtc_Word16 WebRtcIlbcfix_DecodePlc(iLBC_decinst_t *iLBCdec_inst, WebRtc_Word1
|
||||
return (noOfLostFrames*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl);
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcIlbcfix_NetEqPlc(iLBC_decinst_t *iLBCdec_inst, WebRtc_Word16 *decoded, WebRtc_Word16 noOfLostFrames) {
|
||||
int16_t WebRtcIlbcfix_NetEqPlc(iLBC_decinst_t *iLBCdec_inst, int16_t *decoded, int16_t noOfLostFrames) {
|
||||
|
||||
/* Two input parameters not used, but needed for function pointers in NetEQ */
|
||||
(void)(decoded = NULL);
|
||||
|
||||
Reference in New Issue
Block a user