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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.c

Issue 1230693002: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments Created 5 years, 4 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 12
13 iLBC Speech Coder ANSI-C Source Code 13 iLBC Speech Coder ANSI-C Source Code
14 14
15 WebRtcIlbcfix_CbUpdateBestIndex.c 15 WebRtcIlbcfix_CbUpdateBestIndex.c
16 16
17 ******************************************************************/ 17 ******************************************************************/
18 18
19 #include "defines.h" 19 #include "defines.h"
20 #include "cb_update_best_index.h" 20 #include "cb_update_best_index.h"
21 #include "constants.h" 21 #include "constants.h"
22 22
23 void WebRtcIlbcfix_CbUpdateBestIndex( 23 void WebRtcIlbcfix_CbUpdateBestIndex(
24 int32_t CritNew, /* (i) New Potentially best Criteria */ 24 int32_t CritNew, /* (i) New Potentially best Criteria */
25 int16_t CritNewSh, /* (i) Shift value of above Criteria */ 25 int16_t CritNewSh, /* (i) Shift value of above Criteria */
26 int16_t IndexNew, /* (i) Index of new Criteria */ 26 size_t IndexNew, /* (i) Index of new Criteria */
27 int32_t cDotNew, /* (i) Cross dot of new index */ 27 int32_t cDotNew, /* (i) Cross dot of new index */
28 int16_t invEnergyNew, /* (i) Inversed energy new index */ 28 int16_t invEnergyNew, /* (i) Inversed energy new index */
29 int16_t energyShiftNew, /* (i) Energy shifts of new index */ 29 int16_t energyShiftNew, /* (i) Energy shifts of new index */
30 int32_t *CritMax, /* (i/o) Maximum Criteria (so far) */ 30 int32_t *CritMax, /* (i/o) Maximum Criteria (so far) */
31 int16_t *shTotMax, /* (i/o) Shifts of maximum criteria */ 31 int16_t *shTotMax, /* (i/o) Shifts of maximum criteria */
32 int16_t *bestIndex, /* (i/o) Index that corresponds to 32 size_t *bestIndex, /* (i/o) Index that corresponds to
33 maximum criteria */ 33 maximum criteria */
34 int16_t *bestGain) /* (i/o) Gain in Q14 that corresponds 34 int16_t *bestGain) /* (i/o) Gain in Q14 that corresponds
35 to maximum criteria */ 35 to maximum criteria */
36 { 36 {
37 int16_t shOld, shNew, tmp16; 37 int16_t shOld, shNew, tmp16;
38 int16_t scaleTmp; 38 int16_t scaleTmp;
39 int32_t gainW32; 39 int32_t gainW32;
40 40
41 /* Normalize the new and old Criteria to the same domain */ 41 /* Normalize the new and old Criteria to the same domain */
42 if (CritNewSh>(*shTotMax)) { 42 if (CritNewSh>(*shTotMax)) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 *bestGain=(int16_t)gainW32; 79 *bestGain=(int16_t)gainW32;
80 } 80 }
81 81
82 *CritMax=CritNew; 82 *CritMax=CritNew;
83 *shTotMax=CritNewSh; 83 *shTotMax=CritNewSh;
84 *bestIndex = IndexNew; 84 *bestIndex = IndexNew;
85 } 85 }
86 86
87 return; 87 return;
88 } 88 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/cb_update_best_index.h ('k') | webrtc/modules/audio_coding/codecs/ilbc/comp_corr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698