From eb544460e47140d494dddf1217a698a1dcf4dee0 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Wed, 17 Dec 2014 15:23:29 +0000 Subject: [PATCH] Rename _t struct types in audio_coding. _t names are reserved in POSIX. R=henrik.lundin@webrtc.org BUG=162 Review URL: https://webrtc-codereview.appspot.com/34509004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7933 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_coding/codecs/cng/webrtc_cng.c | 38 +++---- .../audio_coding/codecs/g722/g722_decode.c | 17 ++-- .../audio_coding/codecs/g722/g722_enc_dec.h | 24 ++--- .../audio_coding/codecs/g722/g722_encode.c | 14 +-- .../audio_coding/codecs/g722/g722_interface.c | 16 +-- .../audio_coding/codecs/ilbc/abs_quant.c | 2 +- .../audio_coding/codecs/ilbc/abs_quant.h | 2 +- .../audio_coding/codecs/ilbc/cb_search.c | 2 +- .../audio_coding/codecs/ilbc/cb_search.h | 2 +- .../modules/audio_coding/codecs/ilbc/decode.c | 2 +- .../modules/audio_coding/codecs/ilbc/decode.h | 2 +- .../codecs/ilbc/decode_residual.c | 2 +- .../codecs/ilbc/decode_residual.h | 2 +- .../codecs/ilbc/decoder_interpolate_lsf.c | 2 +- .../codecs/ilbc/decoder_interpolate_lsf.h | 2 +- .../audio_coding/codecs/ilbc/defines.h | 8 +- .../modules/audio_coding/codecs/ilbc/do_plc.c | 2 +- .../modules/audio_coding/codecs/ilbc/do_plc.h | 2 +- .../modules/audio_coding/codecs/ilbc/encode.c | 2 +- .../modules/audio_coding/codecs/ilbc/encode.h | 2 +- .../codecs/ilbc/enhancer_interface.c | 2 +- .../codecs/ilbc/enhancer_interface.h | 2 +- .../audio_coding/codecs/ilbc/frame_classify.c | 2 +- .../audio_coding/codecs/ilbc/frame_classify.h | 2 +- .../modules/audio_coding/codecs/ilbc/ilbc.c | 98 +++++++++---------- .../audio_coding/codecs/ilbc/init_decode.c | 2 +- .../audio_coding/codecs/ilbc/init_decode.h | 2 +- .../audio_coding/codecs/ilbc/init_encode.c | 2 +- .../audio_coding/codecs/ilbc/init_encode.h | 2 +- .../audio_coding/codecs/ilbc/lpc_encode.c | 2 +- .../audio_coding/codecs/ilbc/lpc_encode.h | 2 +- .../codecs/ilbc/simple_interpolate_lsf.c | 2 +- .../codecs/ilbc/simple_interpolate_lsf.h | 2 +- .../codecs/ilbc/simple_lpc_analysis.c | 2 +- .../codecs/ilbc/simple_lpc_analysis.h | 2 +- .../audio_coding/codecs/ilbc/state_search.c | 2 +- .../audio_coding/codecs/ilbc/state_search.h | 2 +- .../codecs/ilbc/test/iLBC_testprogram.c | 8 +- .../codecs/isac/fix/source/codec.h | 8 +- .../codecs/isac/fix/source/decode.c | 2 +- .../codecs/isac/fix/source/decode_plc.c | 2 +- .../codecs/isac/fix/source/encode.c | 6 +- .../codecs/isac/fix/source/entropy_coding.c | 18 ++-- .../codecs/isac/fix/source/entropy_coding.h | 8 +- .../codecs/isac/fix/source/isacfix.c | 2 +- .../codecs/isac/fix/source/structs.h | 12 +-- .../codecs/isac/main/source/codec.h | 2 +- .../codecs/isac/main/source/encode.c | 2 +- .../codecs/isac/main/source/entropy_coding.c | 10 +- .../codecs/isac/main/source/entropy_coding.h | 12 ++- .../codecs/isac/main/source/structs.h | 4 +- 51 files changed, 187 insertions(+), 184 deletions(-) diff --git a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c index 614a3df34..9862f1253 100644 --- a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c +++ b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c @@ -16,7 +16,7 @@ #include "cng_helpfuns.h" #include "signal_processing_library.h" -typedef struct WebRtcCngDecInst_t_ { +typedef struct WebRtcCngDecoder_ { uint32_t dec_seed; int32_t dec_target_energy; int32_t dec_used_energy; @@ -32,9 +32,9 @@ typedef struct WebRtcCngDecInst_t_ { int16_t target_scale_factor; /* Q13 */ int16_t errorcode; int16_t initflag; -} WebRtcCngDecInst_t; +} WebRtcCngDecoder; -typedef struct WebRtcCngEncInst_t_ { +typedef struct WebRtcCngEncoder_ { int16_t enc_nrOfCoefs; uint16_t enc_sampfreq; int16_t enc_interval; @@ -45,7 +45,7 @@ typedef struct WebRtcCngEncInst_t_ { uint32_t enc_seed; int16_t errorcode; int16_t initflag; -} WebRtcCngEncInst_t; +} WebRtcCngEncoder; const int32_t WebRtcCng_kDbov[94] = { 1081109975, 858756178, 682134279, 541838517, 430397633, 341876992, @@ -84,10 +84,10 @@ const int16_t WebRtcCng_kCorrWindow[WEBRTC_CNG_MAX_LPC_ORDER] = { */ int16_t WebRtcCng_CreateEnc(CNG_enc_inst** cng_inst) { if (cng_inst != NULL) { - *cng_inst = (CNG_enc_inst*) malloc(sizeof(WebRtcCngEncInst_t)); + *cng_inst = (CNG_enc_inst*) malloc(sizeof(WebRtcCngEncoder)); if (*cng_inst != NULL) { - (*(WebRtcCngEncInst_t**) cng_inst)->errorcode = 0; - (*(WebRtcCngEncInst_t**) cng_inst)->initflag = 0; + (*(WebRtcCngEncoder**) cng_inst)->errorcode = 0; + (*(WebRtcCngEncoder**) cng_inst)->initflag = 0; /* Needed to get the right function pointers in SPLIB. */ WebRtcSpl_Init(); @@ -105,10 +105,10 @@ int16_t WebRtcCng_CreateEnc(CNG_enc_inst** cng_inst) { int16_t WebRtcCng_CreateDec(CNG_dec_inst** cng_inst) { if (cng_inst != NULL ) { - *cng_inst = (CNG_dec_inst*) malloc(sizeof(WebRtcCngDecInst_t)); + *cng_inst = (CNG_dec_inst*) malloc(sizeof(WebRtcCngDecoder)); if (*cng_inst != NULL ) { - (*(WebRtcCngDecInst_t**) cng_inst)->errorcode = 0; - (*(WebRtcCngDecInst_t**) cng_inst)->initflag = 0; + (*(WebRtcCngDecoder**) cng_inst)->errorcode = 0; + (*(WebRtcCngDecoder**) cng_inst)->initflag = 0; /* Needed to get the right function pointers in SPLIB. */ WebRtcSpl_Init(); @@ -145,8 +145,8 @@ int16_t WebRtcCng_CreateDec(CNG_dec_inst** cng_inst) { int16_t WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, uint16_t fs, int16_t interval, int16_t quality) { int i; - WebRtcCngEncInst_t* inst = (WebRtcCngEncInst_t*) cng_inst; - memset(inst, 0, sizeof(WebRtcCngEncInst_t)); + WebRtcCngEncoder* inst = (WebRtcCngEncoder*) cng_inst; + memset(inst, 0, sizeof(WebRtcCngEncoder)); /* Check LPC order */ if (quality > WEBRTC_CNG_MAX_LPC_ORDER || quality <= 0) { @@ -172,9 +172,9 @@ int16_t WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, uint16_t fs, int16_t interval, int16_t WebRtcCng_InitDec(CNG_dec_inst* cng_inst) { int i; - WebRtcCngDecInst_t* inst = (WebRtcCngDecInst_t*) cng_inst; + WebRtcCngDecoder* inst = (WebRtcCngDecoder*) cng_inst; - memset(inst, 0, sizeof(WebRtcCngDecInst_t)); + memset(inst, 0, sizeof(WebRtcCngDecoder)); inst->dec_seed = 7777; /* For debugging only. */ inst->dec_order = 5; inst->dec_target_scale_factor = 0; @@ -230,7 +230,7 @@ int16_t WebRtcCng_FreeDec(CNG_dec_inst* cng_inst) { int16_t WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, int16_t nrOfSamples, uint8_t* SIDdata, int16_t* bytesOut, int16_t forceSID) { - WebRtcCngEncInst_t* inst = (WebRtcCngEncInst_t*) cng_inst; + WebRtcCngEncoder* inst = (WebRtcCngEncoder*) cng_inst; int16_t arCoefs[WEBRTC_CNG_MAX_LPC_ORDER + 1]; int32_t corrVector[WEBRTC_CNG_MAX_LPC_ORDER + 1]; @@ -413,7 +413,7 @@ int16_t WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech, int16_t WebRtcCng_UpdateSid(CNG_dec_inst* cng_inst, uint8_t* SID, size_t length) { - WebRtcCngDecInst_t* inst = (WebRtcCngDecInst_t*) cng_inst; + WebRtcCngDecoder* inst = (WebRtcCngDecoder*) cng_inst; int16_t refCs[WEBRTC_CNG_MAX_LPC_ORDER]; int32_t targetEnergy; int i; @@ -474,7 +474,7 @@ int16_t WebRtcCng_UpdateSid(CNG_dec_inst* cng_inst, uint8_t* SID, */ int16_t WebRtcCng_Generate(CNG_dec_inst* cng_inst, int16_t* outData, int16_t nrOfSamples, int16_t new_period) { - WebRtcCngDecInst_t* inst = (WebRtcCngDecInst_t*) cng_inst; + WebRtcCngDecoder* inst = (WebRtcCngDecoder*) cng_inst; int i; int16_t excitation[WEBRTC_CNG_MAX_OUTSIZE_ORDER]; @@ -591,12 +591,12 @@ int16_t WebRtcCng_Generate(CNG_dec_inst* cng_inst, int16_t* outData, */ int16_t WebRtcCng_GetErrorCodeEnc(CNG_enc_inst* cng_inst) { /* Typecast pointer to real structure. */ - WebRtcCngEncInst_t* inst = (WebRtcCngEncInst_t*) cng_inst; + WebRtcCngEncoder* inst = (WebRtcCngEncoder*) cng_inst; return inst->errorcode; } int16_t WebRtcCng_GetErrorCodeDec(CNG_dec_inst* cng_inst) { /* Typecast pointer to real structure. */ - WebRtcCngDecInst_t* inst = (WebRtcCngDecInst_t*) cng_inst; + WebRtcCngDecoder* inst = (WebRtcCngDecoder*) cng_inst; return inst->errorcode; } diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c index 65ca77bad..ee0eb8961 100644 --- a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c +++ b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c @@ -62,9 +62,9 @@ static __inline int16_t saturate(int32_t amp) } /*- End of function --------------------------------------------------------*/ -static void block4(g722_decode_state_t *s, int band, int d); +static void block4(G722DecoderState *s, int band, int d); -static void block4(g722_decode_state_t *s, int band, int d) +static void block4(G722DecoderState *s, int band, int d) { int wd1; int wd2; @@ -154,13 +154,12 @@ static void block4(g722_decode_state_t *s, int band, int d) } /*- End of function --------------------------------------------------------*/ -g722_decode_state_t *WebRtc_g722_decode_init(g722_decode_state_t *s, - int rate, - int options) -{ +G722DecoderState* WebRtc_g722_decode_init(G722DecoderState* s, + int rate, + int options) { if (s == NULL) { - if ((s = (g722_decode_state_t *) malloc(sizeof(*s))) == NULL) + if ((s = (G722DecoderState *) malloc(sizeof(*s))) == NULL) return NULL; } memset(s, 0, sizeof(*s)); @@ -182,14 +181,14 @@ g722_decode_state_t *WebRtc_g722_decode_init(g722_decode_state_t *s, } /*- End of function --------------------------------------------------------*/ -int WebRtc_g722_decode_release(g722_decode_state_t *s) +int WebRtc_g722_decode_release(G722DecoderState *s) { free(s); return 0; } /*- End of function --------------------------------------------------------*/ -int WebRtc_g722_decode(g722_decode_state_t *s, int16_t amp[], +int WebRtc_g722_decode(G722DecoderState *s, int16_t amp[], const uint8_t g722_data[], int len) { static const int wl[8] = {-60, -30, 58, 172, 334, 538, 1198, 3042 }; diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h b/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h index da6122456..5cd1b2d30 100644 --- a/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h +++ b/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h @@ -91,7 +91,7 @@ typedef struct int in_bits; unsigned int out_buffer; int out_bits; -} g722_encode_state_t; +} G722EncoderState; typedef struct { @@ -129,26 +129,26 @@ typedef struct int in_bits; unsigned int out_buffer; int out_bits; -} g722_decode_state_t; +} G722DecoderState; #ifdef __cplusplus extern "C" { #endif -g722_encode_state_t *WebRtc_g722_encode_init(g722_encode_state_t *s, - int rate, - int options); -int WebRtc_g722_encode_release(g722_encode_state_t *s); -int WebRtc_g722_encode(g722_encode_state_t *s, +G722EncoderState* WebRtc_g722_encode_init(G722EncoderState* s, + int rate, + int options); +int WebRtc_g722_encode_release(G722EncoderState *s); +int WebRtc_g722_encode(G722EncoderState *s, uint8_t g722_data[], const int16_t amp[], int len); -g722_decode_state_t *WebRtc_g722_decode_init(g722_decode_state_t *s, - int rate, - int options); -int WebRtc_g722_decode_release(g722_decode_state_t *s); -int WebRtc_g722_decode(g722_decode_state_t *s, +G722DecoderState* WebRtc_g722_decode_init(G722DecoderState* s, + int rate, + int options); +int WebRtc_g722_decode_release(G722DecoderState *s); +int WebRtc_g722_decode(G722DecoderState *s, int16_t amp[], const uint8_t g722_data[], int len); diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_encode.c b/webrtc/modules/audio_coding/codecs/g722/g722_encode.c index 03ac3c52f..bed2d218b 100644 --- a/webrtc/modules/audio_coding/codecs/g722/g722_encode.c +++ b/webrtc/modules/audio_coding/codecs/g722/g722_encode.c @@ -62,7 +62,7 @@ static __inline int16_t saturate(int32_t amp) } /*- End of function --------------------------------------------------------*/ -static void block4(g722_encode_state_t *s, int band, int d) +static void block4(G722EncoderState *s, int band, int d) { int wd1; int wd2; @@ -151,12 +151,12 @@ static void block4(g722_encode_state_t *s, int band, int d) } /*- End of function --------------------------------------------------------*/ -g722_encode_state_t *WebRtc_g722_encode_init(g722_encode_state_t *s, - int rate, int options) -{ +G722EncoderState* WebRtc_g722_encode_init(G722EncoderState* s, + int rate, + int options) { if (s == NULL) { - if ((s = (g722_encode_state_t *) malloc(sizeof(*s))) == NULL) + if ((s = (G722EncoderState *) malloc(sizeof(*s))) == NULL) return NULL; } memset(s, 0, sizeof(*s)); @@ -178,7 +178,7 @@ g722_encode_state_t *WebRtc_g722_encode_init(g722_encode_state_t *s, } /*- End of function --------------------------------------------------------*/ -int WebRtc_g722_encode_release(g722_encode_state_t *s) +int WebRtc_g722_encode_release(G722EncoderState *s) { free(s); return 0; @@ -202,7 +202,7 @@ int16_t limitValues (int16_t rl) } #endif -int WebRtc_g722_encode(g722_encode_state_t *s, uint8_t g722_data[], +int WebRtc_g722_encode(G722EncoderState *s, uint8_t g722_data[], const int16_t amp[], int len) { static const int q6[32] = diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_interface.c b/webrtc/modules/audio_coding/codecs/g722/g722_interface.c index a2155e877..9a67d88af 100644 --- a/webrtc/modules/audio_coding/codecs/g722/g722_interface.c +++ b/webrtc/modules/audio_coding/codecs/g722/g722_interface.c @@ -18,7 +18,7 @@ int16_t WebRtcG722_CreateEncoder(G722EncInst **G722enc_inst) { - *G722enc_inst=(G722EncInst*)malloc(sizeof(g722_encode_state_t)); + *G722enc_inst=(G722EncInst*)malloc(sizeof(G722EncoderState)); if (*G722enc_inst!=NULL) { return(0); } else { @@ -31,7 +31,7 @@ int16_t WebRtcG722_EncoderInit(G722EncInst *G722enc_inst) // Create and/or reset the G.722 encoder // Bitrate 64 kbps and wideband mode (2) G722enc_inst = (G722EncInst *) WebRtc_g722_encode_init( - (g722_encode_state_t*) G722enc_inst, 64000, 2); + (G722EncoderState*) G722enc_inst, 64000, 2); if (G722enc_inst == NULL) { return -1; } else { @@ -42,7 +42,7 @@ int16_t WebRtcG722_EncoderInit(G722EncInst *G722enc_inst) int16_t WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst) { // Free encoder memory - return WebRtc_g722_encode_release((g722_encode_state_t*) G722enc_inst); + return WebRtc_g722_encode_release((G722EncoderState*) G722enc_inst); } int16_t WebRtcG722_Encode(G722EncInst *G722enc_inst, @@ -52,13 +52,13 @@ int16_t WebRtcG722_Encode(G722EncInst *G722enc_inst, { unsigned char *codechar = (unsigned char*) encoded; // Encode the input speech vector - return WebRtc_g722_encode((g722_encode_state_t*) G722enc_inst, + return WebRtc_g722_encode((G722EncoderState*) G722enc_inst, codechar, speechIn, len); } int16_t WebRtcG722_CreateDecoder(G722DecInst **G722dec_inst) { - *G722dec_inst=(G722DecInst*)malloc(sizeof(g722_decode_state_t)); + *G722dec_inst=(G722DecInst*)malloc(sizeof(G722DecoderState)); if (*G722dec_inst!=NULL) { return(0); } else { @@ -71,7 +71,7 @@ int16_t WebRtcG722_DecoderInit(G722DecInst *G722dec_inst) // Create and/or reset the G.722 decoder // Bitrate 64 kbps and wideband mode (2) G722dec_inst = (G722DecInst *) WebRtc_g722_decode_init( - (g722_decode_state_t*) G722dec_inst, 64000, 2); + (G722DecoderState*) G722dec_inst, 64000, 2); if (G722dec_inst == NULL) { return -1; } else { @@ -82,7 +82,7 @@ int16_t WebRtcG722_DecoderInit(G722DecInst *G722dec_inst) int16_t WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst) { // Free encoder memory - return WebRtc_g722_decode_release((g722_decode_state_t*) G722dec_inst); + return WebRtc_g722_decode_release((G722DecoderState*) G722dec_inst); } int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst, @@ -93,7 +93,7 @@ int16_t WebRtcG722_Decode(G722DecInst *G722dec_inst, { // Decode the G.722 encoder stream *speechType=G722_WEBRTC_SPEECH; - return WebRtc_g722_decode((g722_decode_state_t*) G722dec_inst, + return WebRtc_g722_decode((G722DecoderState*) G722dec_inst, decoded, (uint8_t*) encoded, len); } diff --git a/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c b/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c index 8a8b133b0..75fc970dd 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.c @@ -27,7 +27,7 @@ *---------------------------------------------------------------*/ void WebRtcIlbcfix_AbsQuant( - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i) Encoder instance */ iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits (outputs idxForMax and idxVec, uses state_first as diff --git a/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h b/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h index c061ff4ee..515453452 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/abs_quant.h @@ -27,7 +27,7 @@ *---------------------------------------------------------------*/ void WebRtcIlbcfix_AbsQuant( - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i) Encoder instance */ iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits (outputs idxForMax and idxVec, uses state_first as diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c index 667240a55..8a89c87ff 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c @@ -34,7 +34,7 @@ *----------------------------------------------------------------*/ void WebRtcIlbcfix_CbSearch( - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i) the encoder state structure */ int16_t *index, /* (o) Codebook indices */ int16_t *gain_index, /* (o) Gain quantization indices */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h b/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h index fc621900f..2fe236f4c 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_search.h @@ -20,7 +20,7 @@ #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ILBC_MAIN_SOURCE_CB_SEARCH_H_ void WebRtcIlbcfix_CbSearch( - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i) the encoder state structure */ int16_t *index, /* (o) Codebook indices */ int16_t *gain_index, /* (o) Gain quantization indices */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decode.c b/webrtc/modules/audio_coding/codecs/ilbc/decode.c index febd4ceb0..3a2e5a234 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/decode.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/decode.c @@ -39,7 +39,7 @@ void WebRtcIlbcfix_DecodeImpl( int16_t *decblock, /* (o) decoded signal block */ const uint16_t *bytes, /* (i) encoded signal bits */ - iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) the decoder state + IlbcDecoder *iLBCdec_inst, /* (i/o) the decoder state structure */ int16_t mode /* (i) 0: bad packet, PLC, 1: normal */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decode.h b/webrtc/modules/audio_coding/codecs/ilbc/decode.h index 71e38026c..0c4c2ef84 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/decode.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/decode.h @@ -28,7 +28,7 @@ void WebRtcIlbcfix_DecodeImpl( int16_t *decblock, /* (o) decoded signal block */ const uint16_t *bytes, /* (i) encoded signal bits */ - iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) the decoder state + IlbcDecoder *iLBCdec_inst, /* (i/o) the decoder state structure */ int16_t mode /* (i) 0: bad packet, PLC, 1: normal */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c b/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c index c65856b7b..169218aa8 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.c @@ -33,7 +33,7 @@ *---------------------------------------------------------------*/ void WebRtcIlbcfix_DecodeResidual( - iLBC_Dec_Inst_t *iLBCdec_inst, + IlbcDecoder *iLBCdec_inst, /* (i/o) the decoder state structure */ iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits, which are used for the decoding */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.h b/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.h index 04d6227ae..67f05a576 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/decode_residual.h @@ -26,7 +26,7 @@ *---------------------------------------------------------------*/ void WebRtcIlbcfix_DecodeResidual( - iLBC_Dec_Inst_t *iLBCdec_inst, + IlbcDecoder *iLBCdec_inst, /* (i/o) the decoder state structure */ iLBC_bits *iLBC_encbits, /* (i/o) Encoded bits, which are used for the decoding */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c b/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c index 35576657c..fad817065 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.c @@ -31,7 +31,7 @@ void WebRtcIlbcfix_DecoderInterpolateLsp( coefficients */ int16_t *lsfdeq, /* (i) dequantized lsf coefficients */ int16_t length, /* (i) length of lsf coefficient vector */ - iLBC_Dec_Inst_t *iLBCdec_inst + IlbcDecoder *iLBCdec_inst /* (i) the decoder state structure */ ){ int i, pos, lp_length; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h b/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h index 02c653aaf..37ecf078e 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/decoder_interpolate_lsf.h @@ -31,7 +31,7 @@ void WebRtcIlbcfix_DecoderInterpolateLsp( coefficients */ int16_t *lsfdeq, /* (i) dequantized lsf coefficients */ int16_t length, /* (i) length of lsf coefficient vector */ - iLBC_Dec_Inst_t *iLBCdec_inst + IlbcDecoder *iLBCdec_inst /* (i) the decoder state structure */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/defines.h b/webrtc/modules/audio_coding/codecs/ilbc/defines.h index 796d7b586..2d37e5265 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/defines.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/defines.h @@ -129,7 +129,7 @@ typedef struct iLBC_bits_t_ { } iLBC_bits; /* type definition encoder instance */ -typedef struct iLBC_Enc_Inst_t_ { +typedef struct IlbcEncoder_ { /* flag for frame size mode */ int16_t mode; @@ -167,10 +167,10 @@ typedef struct iLBC_Enc_Inst_t_ { int16_t diff; #endif -} iLBC_Enc_Inst_t; +} IlbcEncoder; /* type definition decoder instance */ -typedef struct iLBC_Dec_Inst_t_ { +typedef struct IlbcDecoder_ { /* flag for frame size mode */ int16_t mode; @@ -214,6 +214,6 @@ typedef struct iLBC_Dec_Inst_t_ { int16_t enh_buf[ENH_BUFL+ENH_BUFL_FILTEROVERHEAD]; int16_t enh_period[ENH_NBLOCKS_TOT]; -} iLBC_Dec_Inst_t; +} IlbcDecoder; #endif diff --git a/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c b/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c index 4d233e395..53a4e9a51 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/do_plc.c @@ -34,7 +34,7 @@ void WebRtcIlbcfix_DoThePlc( int16_t *decresidual, /* (i) decoded residual */ int16_t *lpc, /* (i) decoded LPC (only used for no PL) */ int16_t inlag, /* (i) pitch lag */ - iLBC_Dec_Inst_t *iLBCdec_inst + IlbcDecoder *iLBCdec_inst /* (i/o) decoder instance */ ){ int16_t i, pick; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h b/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h index 15e68ecb0..c55b81540 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/do_plc.h @@ -34,7 +34,7 @@ void WebRtcIlbcfix_DoThePlc( int16_t *decresidual, /* (i) decoded residual */ int16_t *lpc, /* (i) decoded LPC (only used for no PL) */ int16_t inlag, /* (i) pitch lag */ - iLBC_Dec_Inst_t *iLBCdec_inst + IlbcDecoder *iLBCdec_inst /* (i/o) decoder instance */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/encode.c b/webrtc/modules/audio_coding/codecs/ilbc/encode.c index 318c27a49..6f7c04ef3 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/encode.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/encode.c @@ -45,7 +45,7 @@ void WebRtcIlbcfix_EncodeImpl( uint16_t *bytes, /* (o) encoded data bits iLBC */ const int16_t *block, /* (i) speech vector to encode */ - iLBC_Enc_Inst_t *iLBCenc_inst /* (i/o) the general encoder + IlbcEncoder *iLBCenc_inst /* (i/o) the general encoder state */ ){ int n, meml_gotten, Nfor, Nback; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/encode.h b/webrtc/modules/audio_coding/codecs/ilbc/encode.h index 5a47c5898..fe6ae6250 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/encode.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/encode.h @@ -28,7 +28,7 @@ void WebRtcIlbcfix_EncodeImpl( uint16_t *bytes, /* (o) encoded data bits iLBC */ const int16_t *block, /* (i) speech vector to encode */ - iLBC_Enc_Inst_t *iLBCenc_inst /* (i/o) the general encoder + IlbcEncoder *iLBCenc_inst /* (i/o) the general encoder state */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c index 0778c2750..4f279885a 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c @@ -33,7 +33,7 @@ int WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */ int16_t *out, /* (o) enhanced signal */ int16_t *in, /* (i) unenhanced signal */ - iLBC_Dec_Inst_t *iLBCdec_inst /* (i) buffers etc */ + IlbcDecoder *iLBCdec_inst /* (i) buffers etc */ ){ int iblock; int lag=20, tlag=20; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h index f6ebed66e..fa58b7a67 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.h @@ -28,7 +28,7 @@ int WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */ int16_t *out, /* (o) enhanced signal */ int16_t *in, /* (i) unenhanced signal */ - iLBC_Dec_Inst_t *iLBCdec_inst /* (i) buffers etc */ + IlbcDecoder *iLBCdec_inst /* (i) buffers etc */ ); #endif diff --git a/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c b/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c index c2c6f7527..c93cdd490 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.c @@ -25,7 +25,7 @@ int16_t WebRtcIlbcfix_FrameClassify( /* (o) Index to the max-energy sub frame */ - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i/o) the encoder state structure */ int16_t *residualFIX /* (i) lpc residual signal */ ){ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h b/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h index ba9b9fed3..b32e2c87d 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/frame_classify.h @@ -21,7 +21,7 @@ int16_t WebRtcIlbcfix_FrameClassify( /* (o) Index to the max-energy sub frame */ - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i/o) the encoder state structure */ int16_t *residualFIX /* (i) lpc residual signal */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c b/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c index 5af52bb49..4d815fa97 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c @@ -28,7 +28,7 @@ int16_t WebRtcIlbcfix_EncoderAssign(IlbcEncoderInstance** iLBC_encinst, int16_t* ILBCENC_inst_Addr, int16_t* size) { *iLBC_encinst=(IlbcEncoderInstance*)ILBCENC_inst_Addr; - *size=sizeof(iLBC_Enc_Inst_t)/sizeof(int16_t); + *size=sizeof(IlbcEncoder)/sizeof(int16_t); if (*iLBC_encinst!=NULL) { return(0); } else { @@ -40,7 +40,7 @@ int16_t WebRtcIlbcfix_DecoderAssign(IlbcDecoderInstance** iLBC_decinst, int16_t* ILBCDEC_inst_Addr, int16_t* size) { *iLBC_decinst=(IlbcDecoderInstance*)ILBCDEC_inst_Addr; - *size=sizeof(iLBC_Dec_Inst_t)/sizeof(int16_t); + *size=sizeof(IlbcDecoder)/sizeof(int16_t); if (*iLBC_decinst!=NULL) { return(0); } else { @@ -49,7 +49,7 @@ int16_t WebRtcIlbcfix_DecoderAssign(IlbcDecoderInstance** iLBC_decinst, } int16_t WebRtcIlbcfix_EncoderCreate(IlbcEncoderInstance **iLBC_encinst) { - *iLBC_encinst=(IlbcEncoderInstance*)malloc(sizeof(iLBC_Enc_Inst_t)); + *iLBC_encinst=(IlbcEncoderInstance*)malloc(sizeof(IlbcEncoder)); if (*iLBC_encinst!=NULL) { WebRtcSpl_Init(); return(0); @@ -59,7 +59,7 @@ int16_t WebRtcIlbcfix_EncoderCreate(IlbcEncoderInstance **iLBC_encinst) { } int16_t WebRtcIlbcfix_DecoderCreate(IlbcDecoderInstance **iLBC_decinst) { - *iLBC_decinst=(IlbcDecoderInstance*)malloc(sizeof(iLBC_Dec_Inst_t)); + *iLBC_decinst=(IlbcDecoderInstance*)malloc(sizeof(IlbcDecoder)); if (*iLBC_decinst!=NULL) { WebRtcSpl_Init(); return(0); @@ -81,7 +81,7 @@ int16_t WebRtcIlbcfix_DecoderFree(IlbcDecoderInstance *iLBC_decinst) { int16_t WebRtcIlbcfix_EncoderInit(IlbcEncoderInstance* iLBCenc_inst, int16_t mode) { if ((mode==20)||(mode==30)) { - WebRtcIlbcfix_InitEncode((iLBC_Enc_Inst_t*) iLBCenc_inst, mode); + WebRtcIlbcfix_InitEncode((IlbcEncoder*) iLBCenc_inst, mode); return(0); } else { return(-1); @@ -95,12 +95,12 @@ int16_t WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst, int16_t pos = 0; int16_t encpos = 0; - if ((len != ((iLBC_Enc_Inst_t*)iLBCenc_inst)->blockl) && + if ((len != ((IlbcEncoder*)iLBCenc_inst)->blockl) && #ifdef SPLIT_10MS (len != 80) && #endif - (len != 2*((iLBC_Enc_Inst_t*)iLBCenc_inst)->blockl) && - (len != 3*((iLBC_Enc_Inst_t*)iLBCenc_inst)->blockl)) + (len != 2*((IlbcEncoder*)iLBCenc_inst)->blockl) && + (len != 3*((IlbcEncoder*)iLBCenc_inst)->blockl)) { /* A maximum of 3 frames/packet is allowed */ return(-1); @@ -109,14 +109,14 @@ int16_t WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst, /* call encoder */ while (possection == 0) + if(((IlbcEncoder*)iLBCenc_inst)->section == 0) #else - pos += ((iLBC_Enc_Inst_t*)iLBCenc_inst)->blockl; + pos += ((IlbcEncoder*)iLBCenc_inst)->blockl; #endif - encpos += ((iLBC_Enc_Inst_t*)iLBCenc_inst)->no_of_words; + encpos += ((IlbcEncoder*)iLBCenc_inst)->no_of_words; } return (encpos*2); } @@ -125,18 +125,18 @@ int16_t WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst, int16_t WebRtcIlbcfix_DecoderInit(IlbcDecoderInstance* iLBCdec_inst, int16_t mode) { if ((mode==20)||(mode==30)) { - WebRtcIlbcfix_InitDecode((iLBC_Dec_Inst_t*) iLBCdec_inst, mode, 1); + WebRtcIlbcfix_InitDecode((IlbcDecoder*) iLBCdec_inst, mode, 1); return(0); } else { return(-1); } } int16_t WebRtcIlbcfix_DecoderInit20Ms(IlbcDecoderInstance *iLBCdec_inst) { - WebRtcIlbcfix_InitDecode((iLBC_Dec_Inst_t*) iLBCdec_inst, 20, 1); + WebRtcIlbcfix_InitDecode((IlbcDecoder*) iLBCdec_inst, 20, 1); return(0); } int16_t WebRtcIlbcfix_Decoderinit30Ms(IlbcDecoderInstance *iLBCdec_inst) { - WebRtcIlbcfix_InitDecode((iLBC_Dec_Inst_t*) iLBCdec_inst, 30, 1); + WebRtcIlbcfix_InitDecode((IlbcDecoder*) iLBCdec_inst, 30, 1); return(0); } @@ -150,19 +150,19 @@ int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance *iLBCdec_inst, int i=0; /* Allow for automatic switching between the frame sizes (although you do get some discontinuity) */ - if ((len==((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)|| - (len==2*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)|| - (len==3*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)) { + if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)|| + (len==2*((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)|| + (len==3*((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)) { /* ok, do nothing */ } else { /* Test if the mode has changed */ - if (((iLBC_Dec_Inst_t*)iLBCdec_inst)->mode==20) { + if (((IlbcDecoder*)iLBCdec_inst)->mode==20) { if ((len==NO_OF_BYTES_30MS)|| (len==2*NO_OF_BYTES_30MS)|| (len==3*NO_OF_BYTES_30MS)) { WebRtcIlbcfix_InitDecode( - ((iLBC_Dec_Inst_t*)iLBCdec_inst), 30, - ((iLBC_Dec_Inst_t*)iLBCdec_inst)->use_enhancer); + ((IlbcDecoder*)iLBCdec_inst), 30, + ((IlbcDecoder*)iLBCdec_inst)->use_enhancer); } else { /* Unsupported frame length */ return(-1); @@ -172,8 +172,8 @@ int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance *iLBCdec_inst, (len==2*NO_OF_BYTES_20MS)|| (len==3*NO_OF_BYTES_20MS)) { WebRtcIlbcfix_InitDecode( - ((iLBC_Dec_Inst_t*)iLBCdec_inst), 20, - ((iLBC_Dec_Inst_t*)iLBCdec_inst)->use_enhancer); + ((IlbcDecoder*)iLBCdec_inst), 20, + ((IlbcDecoder*)iLBCdec_inst)->use_enhancer); } else { /* Unsupported frame length */ return(-1); @@ -181,17 +181,17 @@ int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance *iLBCdec_inst, } } - while ((i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)no_of_bytes)blockl], + &decoded[i * ((IlbcDecoder*)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 * ((IlbcDecoder*)iLBCdec_inst)->no_of_words], + (IlbcDecoder*)iLBCdec_inst, 1); i++; } /* iLBC does not support VAD/CNG yet */ *speechType=1; - return(i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl); + return(i*((IlbcDecoder*)iLBCdec_inst)->blockl); } int16_t WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance *iLBCdec_inst, @@ -201,25 +201,25 @@ int16_t WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance *iLBCdec_inst, int16_t *speechType) { int i=0; - if ((len==((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)|| - (len==2*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)|| - (len==3*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)) { + if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)|| + (len==2*((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)|| + (len==3*((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)) { /* ok, do nothing */ } else { return(-1); } - while ((i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)no_of_bytes)blockl], + &decoded[i * ((IlbcDecoder*)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 * ((IlbcDecoder*)iLBCdec_inst)->no_of_words], + (IlbcDecoder*)iLBCdec_inst, 1); i++; } /* iLBC does not support VAD/CNG yet */ *speechType=1; - return(i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl); + return(i*((IlbcDecoder*)iLBCdec_inst)->blockl); } int16_t WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance *iLBCdec_inst, @@ -229,25 +229,25 @@ int16_t WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance *iLBCdec_inst, int16_t *speechType) { int i=0; - if ((len==((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)|| - (len==2*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)|| - (len==3*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)) { + if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)|| + (len==2*((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)|| + (len==3*((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)) { /* ok, do nothing */ } else { return(-1); } - while ((i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->no_of_bytes)no_of_bytes)blockl], + &decoded[i * ((IlbcDecoder*)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 * ((IlbcDecoder*)iLBCdec_inst)->no_of_words], + (IlbcDecoder*)iLBCdec_inst, 1); i++; } /* iLBC does not support VAD/CNG yet */ *speechType=1; - return(i*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl); + return(i*((IlbcDecoder*)iLBCdec_inst)->blockl); } int16_t WebRtcIlbcfix_DecodePlc(IlbcDecoderInstance* iLBCdec_inst, @@ -259,10 +259,10 @@ int16_t WebRtcIlbcfix_DecodePlc(IlbcDecoderInstance* iLBCdec_inst, for (i=0;iblockl], &dummy, - (iLBC_Dec_Inst_t*)iLBCdec_inst, 0); + &decoded[i * ((IlbcDecoder*)iLBCdec_inst)->blockl], &dummy, + (IlbcDecoder*)iLBCdec_inst, 0); } - return (noOfLostFrames*((iLBC_Dec_Inst_t*)iLBCdec_inst)->blockl); + return (noOfLostFrames*((IlbcDecoder*)iLBCdec_inst)->blockl); } int16_t WebRtcIlbcfix_NetEqPlc(IlbcDecoderInstance* iLBCdec_inst, @@ -272,8 +272,8 @@ int16_t WebRtcIlbcfix_NetEqPlc(IlbcDecoderInstance* iLBCdec_inst, (void)(decoded = NULL); (void)(noOfLostFrames = 0); - WebRtcSpl_MemSetW16(((iLBC_Dec_Inst_t*)iLBCdec_inst)->enh_buf, 0, ENH_BUFL); - ((iLBC_Dec_Inst_t*)iLBCdec_inst)->prev_enh_pl = 2; + WebRtcSpl_MemSetW16(((IlbcDecoder*)iLBCdec_inst)->enh_buf, 0, ENH_BUFL); + ((IlbcDecoder*)iLBCdec_inst)->prev_enh_pl = 2; return (0); } diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c index f76ade056..d903ac7e8 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c @@ -24,7 +24,7 @@ *---------------------------------------------------------------*/ int16_t WebRtcIlbcfix_InitDecode( /* (o) Number of decoded samples */ - iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) Decoder instance */ + IlbcDecoder *iLBCdec_inst, /* (i/o) Decoder instance */ int16_t mode, /* (i) frame size mode */ int use_enhancer) { /* (i) 1: use enhancer, 0: no enhancer */ int i; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h index 2938c74e0..4871b5c1a 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h @@ -26,7 +26,7 @@ *---------------------------------------------------------------*/ int16_t WebRtcIlbcfix_InitDecode( /* (o) Number of decoded samples */ - iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) Decoder instance */ + IlbcDecoder *iLBCdec_inst, /* (i/o) Decoder instance */ int16_t mode, /* (i) frame size mode */ int use_enhancer /* (i) 1 to use enhancer 0 to run without enhancer */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c index f6da158ba..1a2fa0892 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c @@ -24,7 +24,7 @@ *---------------------------------------------------------------*/ int16_t WebRtcIlbcfix_InitEncode( /* (o) Number of bytes encoded */ - iLBC_Enc_Inst_t *iLBCenc_inst, /* (i/o) Encoder instance */ + IlbcEncoder *iLBCenc_inst, /* (i/o) Encoder instance */ int16_t mode) { /* (i) frame size mode */ iLBCenc_inst->mode = mode; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h index 562efb19c..2eea27c8e 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h @@ -26,7 +26,7 @@ *---------------------------------------------------------------*/ int16_t WebRtcIlbcfix_InitEncode( /* (o) Number of bytes encoded */ - iLBC_Enc_Inst_t *iLBCenc_inst, /* (i/o) Encoder instance */ + IlbcEncoder *iLBCenc_inst, /* (i/o) Encoder instance */ int16_t mode /* (i) frame size mode */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c b/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c index 8f9a3c03e..258b6b155 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.c @@ -34,7 +34,7 @@ void WebRtcIlbcfix_LpcEncode( before/after encoding */ int16_t *lsf_index, /* (o) lsf quantization index */ int16_t *data, /* (i) Speech to do LPC analysis on */ - iLBC_Enc_Inst_t *iLBCenc_inst + IlbcEncoder *iLBCenc_inst /* (i/o) the encoder state structure */ ) { /* Stack based */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h b/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h index 8d87b0a82..9f6f50416 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/lpc_encode.h @@ -32,7 +32,7 @@ void WebRtcIlbcfix_LpcEncode( before/after encoding */ int16_t *lsf_index, /* (o) lsf quantization index */ int16_t *data, /* (i) Speech to do LPC analysis on */ - iLBC_Enc_Inst_t *iLBCenc_inst + IlbcEncoder *iLBCenc_inst /* (i/o) the encoder state structure */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c b/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c index 905549386..d89770ec0 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.c @@ -39,7 +39,7 @@ void WebRtcIlbcfix_SimpleInterpolateLsf( int16_t *lsfdeqold, /* (i) the dequantized lsf coefficients of the previous signal frame Q13 */ int16_t length, /* (i) should equate FILTERORDER */ - iLBC_Enc_Inst_t *iLBCenc_inst + IlbcEncoder *iLBCenc_inst /* (i/o) the encoder state structure */ ) { int i, pos, lp_length; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.h b/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.h index b11f5d82c..6abcc00b9 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/simple_interpolate_lsf.h @@ -39,7 +39,7 @@ void WebRtcIlbcfix_SimpleInterpolateLsf( int16_t *lsfdeqold, /* (i) the dequantized lsf coefficients of the previous signal frame Q13 */ int16_t length, /* (i) should equate FILTERORDER */ - iLBC_Enc_Inst_t *iLBCenc_inst + IlbcEncoder *iLBCenc_inst /* (i/o) the encoder state structure */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c b/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c index f8125e1cd..dfc637bef 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.c @@ -29,7 +29,7 @@ void WebRtcIlbcfix_SimpleLpcAnalysis( int16_t *lsf, /* (o) lsf coefficients */ int16_t *data, /* (i) new block of speech */ - iLBC_Enc_Inst_t *iLBCenc_inst + IlbcEncoder *iLBCenc_inst /* (i/o) the encoder state structure */ ) { int k; diff --git a/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.h b/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.h index a3d1985ce..7808da140 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/simple_lpc_analysis.h @@ -28,7 +28,7 @@ void WebRtcIlbcfix_SimpleLpcAnalysis( int16_t *lsf, /* (o) lsf coefficients */ int16_t *data, /* (i) new block of speech */ - iLBC_Enc_Inst_t *iLBCenc_inst + IlbcEncoder *iLBCenc_inst /* (i/o) the encoder state structure */ ); diff --git a/webrtc/modules/audio_coding/codecs/ilbc/state_search.c b/webrtc/modules/audio_coding/codecs/ilbc/state_search.c index bf9c7a912..5d85a84b2 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/state_search.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/state_search.c @@ -25,7 +25,7 @@ *---------------------------------------------------------------*/ void WebRtcIlbcfix_StateSearch( - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i) Encoder instance */ iLBC_bits *iLBC_encbits,/* (i/o) Encoded bits (output idxForMax and idxVec, input state_first) */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/state_search.h b/webrtc/modules/audio_coding/codecs/ilbc/state_search.h index 80a4f13db..800beac09 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/state_search.h +++ b/webrtc/modules/audio_coding/codecs/ilbc/state_search.h @@ -26,7 +26,7 @@ *---------------------------------------------------------------*/ void WebRtcIlbcfix_StateSearch( - iLBC_Enc_Inst_t *iLBCenc_inst, + IlbcEncoder *iLBCenc_inst, /* (i) Encoder instance */ iLBC_bits *iLBC_encbits,/* (i/o) Encoded bits (output idxForMax and idxVec, input state_first) */ diff --git a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testprogram.c b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testprogram.c index 934d4bee5..303ede3e6 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testprogram.c +++ b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testprogram.c @@ -40,7 +40,7 @@ *---------------------------------------------------------------*/ short encode( /* (o) Number of bytes encoded */ - iLBC_Enc_Inst_t *iLBCenc_inst, /* (i/o) Encoder instance */ + IlbcEncoder *iLBCenc_inst, /* (i/o) Encoder instance */ int16_t *encoded_data, /* (o) The encoded bytes */ int16_t *data /* (i) The signal block to encode */ ){ @@ -56,7 +56,7 @@ short encode( /* (o) Number of bytes encoded */ *---------------------------------------------------------------*/ short decode( /* (o) Number of decoded samples */ - iLBC_Dec_Inst_t *iLBCdec_inst, /* (i/o) Decoder instance */ + IlbcDecoder *iLBCdec_inst, /* (i/o) Decoder instance */ short *decoded_data, /* (o) Decoded signal block */ short *encoded_data, /* (i) Encoded bytes */ short mode /* (i) 0=PL, 1=Normal */ @@ -100,8 +100,8 @@ int main(int argc, char* argv[]) short *channeldata; int blockcount = 0, noOfBlocks=0, i, noOfLostBlocks=0; short mode; - iLBC_Enc_Inst_t Enc_Inst; - iLBC_Dec_Inst_t Dec_Inst; + IlbcEncoder Enc_Inst; + IlbcDecoder Dec_Inst; short frameLen; short count; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h index a38c6e566..488ee2e76 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h @@ -33,19 +33,19 @@ int WebRtcIsacfix_EstimateBandwidth(BwEstimatorstr* bwest_str, uint32_t arr_ts); int16_t WebRtcIsacfix_DecodeImpl(int16_t* signal_out16, - ISACFIX_DecInst_t* ISACdec_obj, + IsacFixDecoderInstance* ISACdec_obj, int16_t* current_framesamples); int16_t WebRtcIsacfix_DecodePlcImpl(int16_t* decoded, - ISACFIX_DecInst_t* ISACdec_obj, + IsacFixDecoderInstance* ISACdec_obj, int16_t* current_framesample ); int WebRtcIsacfix_EncodeImpl(int16_t* in, - ISACFIX_EncInst_t* ISACenc_obj, + IsacFixEncoderInstance* ISACenc_obj, BwEstimatorstr* bw_estimatordata, int16_t CodingMode); -int WebRtcIsacfix_EncodeStoredData(ISACFIX_EncInst_t* ISACenc_obj, +int WebRtcIsacfix_EncodeStoredData(IsacFixEncoderInstance* ISACenc_obj, int BWnumber, float scale); diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c index fb9c7be9e..3126f55d3 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c @@ -28,7 +28,7 @@ int16_t WebRtcIsacfix_DecodeImpl(int16_t *signal_out16, - ISACFIX_DecInst_t *ISACdec_obj, + IsacFixDecoderInstance *ISACdec_obj, int16_t *current_framesamples) { int k; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c index 51344c2ad..510f5e8b9 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c @@ -236,7 +236,7 @@ static void LinearResampler( int16_t *in, int16_t *out, int16_t lenIn, int16_t l int16_t WebRtcIsacfix_DecodePlcImpl(int16_t *signal_out16, - ISACFIX_DecInst_t *ISACdec_obj, + IsacFixDecoderInstance *ISACdec_obj, int16_t *current_framesamples ) { int subframecnt; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c index 2c63c0275..4090720e8 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/encode.c @@ -32,7 +32,7 @@ int WebRtcIsacfix_EncodeImpl(int16_t *in, - ISACFIX_EncInst_t *ISACenc_obj, + IsacFixEncoderInstance *ISACenc_obj, BwEstimatorstr *bw_estimatordata, int16_t CodingMode) { @@ -491,7 +491,7 @@ int WebRtcIsacfix_EncodeImpl(int16_t *in, The same data as previously encoded with the fucntion WebRtcIsacfix_EncodeImpl() is used. The data needed is taken from the struct, where it was stored when calling the encoder. */ -int WebRtcIsacfix_EncodeStoredData(ISACFIX_EncInst_t *ISACenc_obj, +int WebRtcIsacfix_EncodeStoredData(IsacFixEncoderInstance *ISACenc_obj, int BWnumber, float scale) { @@ -503,7 +503,7 @@ int WebRtcIsacfix_EncodeStoredData(ISACFIX_EncInst_t *ISACenc_obj, int16_t model; const uint16_t *Q_PitchGain_cdf_ptr[1]; const uint16_t **cdf; - const ISAC_SaveEncData_t *SaveEnc_str; + const IsacSaveEncoderData *SaveEnc_str; int32_t tmpLPCcoeffs_g[KLT_ORDER_GAIN<<1]; int16_t tmpLPCindex_g[KLT_ORDER_GAIN<<1]; int16_t tmp_fre[FRAMESAMPLES]; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c index 869db75da..c80de04d1 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c @@ -1059,7 +1059,7 @@ static int EstCodeLpcCoef(int32_t *LPCCoefQ17, int16_t *model, int32_t *sizeQ11, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData, + IsacSaveEncoderData* encData, transcode_obj *transcodingParam) { int j, k, n; int16_t posQQ, pos2QQ, gainpos; @@ -1334,7 +1334,7 @@ static int EstCodeLpcCoef(int32_t *LPCCoefQ17, int WebRtcIsacfix_EstCodeLpcGain(int32_t *gain_lo_hiQ17, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData) { + IsacSaveEncoderData* encData) { int j, k; int16_t posQQ, pos2QQ, gainpos; int16_t posg; @@ -1440,7 +1440,7 @@ int WebRtcIsacfix_EncodeLpc(int32_t *gain_lo_hiQ17, int16_t *model, int32_t *sizeQ11, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData, + IsacSaveEncoderData* encData, transcode_obj *transcodeParam) { int status = 0; @@ -1599,8 +1599,9 @@ int WebRtcIsacfix_DecodePitchGain(Bitstr_dec *streamdata, int16_t *PitchGains_Q1 /* quantize & code Pitch Gains */ -int WebRtcIsacfix_EncodePitchGain(int16_t *PitchGains_Q12, Bitstr_enc *streamdata, ISAC_SaveEncData_t* encData) -{ +int WebRtcIsacfix_EncodePitchGain(int16_t* PitchGains_Q12, + Bitstr_enc* streamdata, + IsacSaveEncoderData* encData) { int k,j; int16_t SQ15[PITCH_SUBFRAMES]; int16_t index[3]; @@ -1754,9 +1755,10 @@ int WebRtcIsacfix_DecodePitchLag(Bitstr_dec *streamdata, /* quantize & code Pitch Lags */ -int WebRtcIsacfix_EncodePitchLag(int16_t *PitchLagsQ7,int16_t *PitchGain_Q12, - Bitstr_enc *streamdata, ISAC_SaveEncData_t* encData) -{ +int WebRtcIsacfix_EncodePitchLag(int16_t* PitchLagsQ7, + int16_t* PitchGain_Q12, + Bitstr_enc* streamdata, + IsacSaveEncoderData* encData) { int k, j; int16_t index[PITCH_SUBFRAMES]; int32_t meangainQ12, CQ17; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h index efed76709..741646f01 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h @@ -53,12 +53,12 @@ int WebRtcIsacfix_EncodeLpc(int32_t *gain_lo_hiQ17, int16_t *model, int32_t *sizeQ11, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData, + IsacSaveEncoderData* encData, transcode_obj *transcodeParam); int WebRtcIsacfix_EstCodeLpcGain(int32_t *gain_lo_hiQ17, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData); + IsacSaveEncoderData* encData); /* decode & dequantize RC */ int WebRtcIsacfix_DecodeRcCoef(Bitstr_dec *streamdata, int16_t *RCQ15); @@ -77,12 +77,12 @@ int WebRtcIsacfix_EncodeGain2(int32_t *gain2, int WebRtcIsacfix_EncodePitchGain(int16_t *PitchGains_Q12, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData); + IsacSaveEncoderData* encData); int WebRtcIsacfix_EncodePitchLag(int16_t *PitchLagQ7, int16_t *PitchGain_Q12, Bitstr_enc *streamdata, - ISAC_SaveEncData_t* encData); + IsacSaveEncoderData* encData); int WebRtcIsacfix_DecodePitchGain(Bitstr_dec *streamdata, int16_t *PitchGain_Q12); diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c index 5e8fd4f0a..922e0299b 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c @@ -135,7 +135,7 @@ int16_t WebRtcIsacfix_CreateInternal(ISACFIX_MainStruct *ISAC_main_inst) ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst; /* Allocate memory for storing encoder data */ - ISAC_inst->ISACenc_obj.SaveEnc_ptr = malloc(1 * sizeof(ISAC_SaveEncData_t)); + ISAC_inst->ISACenc_obj.SaveEnc_ptr = malloc(1 * sizeof(IsacSaveEncoderData)); if (ISAC_inst->ISACenc_obj.SaveEnc_ptr!=NULL) { return(0); diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h index 0e84cd097..5f3e0c303 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h @@ -299,7 +299,7 @@ typedef struct { /* Used in adaptive mode only */ int minBytes; -} ISAC_SaveEncData_t; +} IsacSaveEncoderData; typedef struct { @@ -327,14 +327,14 @@ typedef struct { PostFiltBankstr interpolatorstr_obj; #endif - ISAC_SaveEncData_t *SaveEnc_ptr; + IsacSaveEncoderData *SaveEnc_ptr; int16_t payloadLimitBytes30; /* Maximum allowed number of bits for a 30 msec packet */ int16_t payloadLimitBytes60; /* Maximum allowed number of bits for a 30 msec packet */ int16_t maxPayloadBytes; /* Maximum allowed number of bits for both 30 and 60 msec packet */ int16_t maxRateInBytes; /* Maximum allowed rate in bytes per 30 msec packet */ int16_t enforceFrameSize; /* If set iSAC will never change packet size */ -} ISACFIX_EncInst_t; +} IsacFixEncoderInstance; typedef struct { @@ -349,14 +349,14 @@ typedef struct { PreFiltBankstr decimatorstr_obj; #endif -} ISACFIX_DecInst_t; +} IsacFixDecoderInstance; typedef struct { - ISACFIX_EncInst_t ISACenc_obj; - ISACFIX_DecInst_t ISACdec_obj; + IsacFixEncoderInstance ISACenc_obj; + IsacFixDecoderInstance ISACdec_obj; BwEstimatorstr bwestimator_obj; int16_t CodingMode; /* 0 = adaptive; 1 = instantaneous */ int16_t errorcode; diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h b/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h index 845f35717..b7319b9ec 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/codec.h @@ -42,7 +42,7 @@ int WebRtcIsac_EncodeLb(float* in, ISACLBEncStruct* ISACencLB_obj, int16_t codingMode, int16_t bottleneckIndex); -int WebRtcIsac_EncodeStoredDataLb(const ISAC_SaveEncData_t* ISACSavedEnc_obj, +int WebRtcIsac_EncodeStoredDataLb(const IsacSaveEncoderData* ISACSavedEnc_obj, Bitstr* ISACBitStr_obj, int BWnumber, float scale); diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c b/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c index 5d8fa3888..a089f72cd 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/encode.c @@ -1004,7 +1004,7 @@ int WebRtcIsac_EncodeUb12(float* in, ISACUBEncStruct* ISACencUB_obj, The data needed is taken from the structure, where it was stored when calling the encoder. */ -int WebRtcIsac_EncodeStoredDataLb(const ISAC_SaveEncData_t* ISACSavedEnc_obj, +int WebRtcIsac_EncodeStoredDataLb(const IsacSaveEncoderData* ISACSavedEnc_obj, Bitstr* ISACBitStr_obj, int BWnumber, float scale) { int ii; diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c index 6cd331052..c8d37e53d 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.c @@ -995,7 +995,7 @@ int WebRtcIsac_DecodeLpcCoef(Bitstr* streamdata, double* LPCCoef) { /* Encode LPC in LAR domain. */ void WebRtcIsac_EncodeLar(double* LPCCoef, Bitstr* streamdata, - ISAC_SaveEncData_t* encData) { + IsacSaveEncoderData* encData) { int j, k, n, pos, pos2, poss, offss, offs2; int index_s[KLT_ORDER_SHAPE]; int index_ovr_s[KLT_ORDER_SHAPE]; @@ -1155,7 +1155,7 @@ void WebRtcIsac_EncodeLar(double* LPCCoef, Bitstr* streamdata, void WebRtcIsac_EncodeLpcLb(double* LPCCoef_lo, double* LPCCoef_hi, - Bitstr* streamdata, ISAC_SaveEncData_t* encData) { + Bitstr* streamdata, IsacSaveEncoderData* encData) { double lars[KLT_ORDER_GAIN + KLT_ORDER_SHAPE]; int k; @@ -1233,7 +1233,7 @@ int16_t WebRtcIsac_EncodeLpcUB(double* lpcVecs, Bitstr* streamdata, void WebRtcIsac_EncodeLpcGainLb(double* LPCCoef_lo, double* LPCCoef_hi, Bitstr* streamdata, - ISAC_SaveEncData_t* encData) { + IsacSaveEncoderData* encData) { int j, k, n, pos, pos2, posg, offsg, offs2; int index_g[KLT_ORDER_GAIN]; int index_ovr_g[KLT_ORDER_GAIN]; @@ -1533,7 +1533,7 @@ int WebRtcIsac_DecodePitchGain(Bitstr* streamdata, /* Quantize & code Pitch Gains. */ void WebRtcIsac_EncodePitchGain(int16_t* PitchGains_Q12, Bitstr* streamdata, - ISAC_SaveEncData_t* encData) { + IsacSaveEncoderData* encData) { int k, j; double C; double S[PITCH_SUBFRAMES]; @@ -1678,7 +1678,7 @@ int WebRtcIsac_DecodePitchLag(Bitstr* streamdata, int16_t* PitchGain_Q12, /* Quantize & code pitch lags. */ void WebRtcIsac_EncodePitchLag(double* PitchLags, int16_t* PitchGain_Q12, Bitstr* streamdata, - ISAC_SaveEncData_t* encData) { + IsacSaveEncoderData* encData) { int k, j; double StepSize; double C; diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h index 1a86ce223..d715d8643 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/entropy_coding.h @@ -87,11 +87,11 @@ int WebRtcIsac_DecodeLpc(Bitstr* streamdata, double* LPCCoef_lo, /* quantize & code LPC Coef */ void WebRtcIsac_EncodeLpcLb(double* LPCCoef_lo, double* LPCCoef_hi, - Bitstr* streamdata, ISAC_SaveEncData_t* encData); + Bitstr* streamdata, IsacSaveEncoderData* encData); void WebRtcIsac_EncodeLpcGainLb(double* LPCCoef_lo, double* LPCCoef_hi, Bitstr* streamdata, - ISAC_SaveEncData_t* encData); + IsacSaveEncoderData* encData); /****************************************************************************** * WebRtcIsac_EncodeLpcUB() @@ -177,10 +177,12 @@ int WebRtcIsac_EncodeGain2(int32_t* gain2, Bitstr* streamdata); void WebRtcIsac_EncodePitchGain(int16_t* PitchGains_Q12, Bitstr* streamdata, - ISAC_SaveEncData_t* encData); + IsacSaveEncoderData* encData); -void WebRtcIsac_EncodePitchLag(double* PitchLags, int16_t* PitchGain_Q12, - Bitstr* streamdata, ISAC_SaveEncData_t* encData); +void WebRtcIsac_EncodePitchLag(double* PitchLags, + int16_t* PitchGain_Q12, + Bitstr* streamdata, + IsacSaveEncoderData* encData); int WebRtcIsac_DecodePitchGain(Bitstr* streamdata, int16_t* PitchGain_Q12); diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h b/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h index 62c890c84..eb85cf34d 100644 --- a/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h +++ b/webrtc/modules/audio_coding/codecs/isac/main/source/structs.h @@ -290,7 +290,7 @@ typedef struct { /* Used in adaptive mode only */ int minBytes; -} ISAC_SaveEncData_t; +} IsacSaveEncoderData; typedef struct { @@ -315,7 +315,7 @@ typedef struct { PitchFiltstr pitchfiltstr_obj; PitchAnalysisStruct pitchanalysisstr_obj; FFTstr fftstr_obj; - ISAC_SaveEncData_t SaveEnc_obj; + IsacSaveEncoderData SaveEnc_obj; int buffer_index; int16_t current_framesamples;