Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/main/source/codec.h

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 /* 11 /*
12 * codec.h 12 * codec.h
13 * 13 *
14 * This header file contains the calls to the internal encoder 14 * This header file contains the calls to the internal encoder
15 * and decoder functions. 15 * and decoder functions.
16 * 16 *
17 */ 17 */
18 18
19 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ 19 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_
20 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ 20 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_
21 21
22 #include "structs.h" 22 #include "structs.h"
23 23
24 24
25 void WebRtcIsac_ResetBitstream(Bitstr* bit_stream); 25 void WebRtcIsac_ResetBitstream(Bitstr* bit_stream);
26 26
27 int WebRtcIsac_EstimateBandwidth(BwEstimatorstr* bwest_str, Bitstr* streamdata, 27 int WebRtcIsac_EstimateBandwidth(BwEstimatorstr* bwest_str, Bitstr* streamdata,
28 int32_t packet_size, 28 size_t packet_size,
29 uint16_t rtp_seq_number, 29 uint16_t rtp_seq_number,
30 uint32_t send_ts, uint32_t arr_ts, 30 uint32_t send_ts, uint32_t arr_ts,
31 enum IsacSamplingRate encoderSampRate, 31 enum IsacSamplingRate encoderSampRate,
32 enum IsacSamplingRate decoderSampRate); 32 enum IsacSamplingRate decoderSampRate);
33 33
34 int WebRtcIsac_DecodeLb(const TransformTables* transform_tables, 34 int WebRtcIsac_DecodeLb(const TransformTables* transform_tables,
35 float* signal_out, 35 float* signal_out,
36 ISACLBDecStruct* ISACdec_obj, 36 ISACLBDecStruct* ISACdec_obj,
37 int16_t* current_framesamples, 37 int16_t* current_framesamples,
38 int16_t isRCUPayload); 38 int16_t isRCUPayload);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 void WebRtcIsac_Spec2time(const TransformTables* tables, 189 void WebRtcIsac_Spec2time(const TransformTables* tables,
190 double* inre, 190 double* inre,
191 double* inim, 191 double* inim,
192 double* outre1, 192 double* outre1,
193 double* outre2, 193 double* outre2,
194 FFTstr* fftstr_obj); 194 FFTstr* fftstr_obj);
195 195
196 /******************************* filter functions ****************************/ 196 /******************************* filter functions ****************************/
197 197
198 void WebRtcIsac_AllPoleFilter(double* InOut, double* Coef, int lengthInOut, 198 void WebRtcIsac_AllPoleFilter(double* InOut, double* Coef, size_t lengthInOut,
199 int orderCoef); 199 int orderCoef);
200 200
201 void WebRtcIsac_AllZeroFilter(double* In, double* Coef, int lengthInOut, 201 void WebRtcIsac_AllZeroFilter(double* In, double* Coef, size_t lengthInOut,
202 int orderCoef, double* Out); 202 int orderCoef, double* Out);
203 203
204 void WebRtcIsac_ZeroPoleFilter(double* In, double* ZeroCoef, double* PoleCoef, 204 void WebRtcIsac_ZeroPoleFilter(double* In, double* ZeroCoef, double* PoleCoef,
205 int lengthInOut, int orderCoef, double* Out); 205 size_t lengthInOut, int orderCoef, double* Out);
206 206
207 207
208 /***************************** filterbank functions **************************/ 208 /***************************** filterbank functions **************************/
209 209
210 void WebRtcIsac_SplitAndFilterFloat(float* in, float* LP, float* HP, 210 void WebRtcIsac_SplitAndFilterFloat(float* in, float* LP, float* HP,
211 double* LP_la, double* HP_la, 211 double* LP_la, double* HP_la,
212 PreFiltBankstr* prefiltdata); 212 PreFiltBankstr* prefiltdata);
213 213
214 214
215 void WebRtcIsac_FilterAndCombineFloat(float* InLP, float* InHP, float* Out, 215 void WebRtcIsac_FilterAndCombineFloat(float* InLP, float* InHP, float* Out,
216 PostFiltBankstr* postfiltdata); 216 PostFiltBankstr* postfiltdata);
217 217
218 218
219 /************************* normalized lattice filters ************************/ 219 /************************* normalized lattice filters ************************/
220 220
221 void WebRtcIsac_NormLatticeFilterMa(int orderCoef, float* stateF, float* stateG, 221 void WebRtcIsac_NormLatticeFilterMa(int orderCoef, float* stateF, float* stateG,
222 float* lat_in, double* filtcoeflo, 222 float* lat_in, double* filtcoeflo,
223 double* lat_out); 223 double* lat_out);
224 224
225 void WebRtcIsac_NormLatticeFilterAr(int orderCoef, float* stateF, float* stateG, 225 void WebRtcIsac_NormLatticeFilterAr(int orderCoef, float* stateF, float* stateG,
226 double* lat_in, double* lo_filt_coef, 226 double* lat_in, double* lo_filt_coef,
227 float* lat_out); 227 float* lat_out);
228 228
229 void WebRtcIsac_Dir2Lat(double* a, int orderCoef, float* sth, float* cth); 229 void WebRtcIsac_Dir2Lat(double* a, int orderCoef, float* sth, float* cth);
230 230
231 void WebRtcIsac_AutoCorr(double* r, const double* x, int N, int order); 231 void WebRtcIsac_AutoCorr(double* r, const double* x, size_t N, size_t order);
232 232
233 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ */ 233 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_CODEC_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698