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

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

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 6 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
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 crossCorrSqMod_Max=0; 50 crossCorrSqMod_Max=0;
51 EnergyMod_Max=WEBRTC_SPL_WORD16_MAX; 51 EnergyMod_Max=WEBRTC_SPL_WORD16_MAX;
52 totscale_max=-500; 52 totscale_max=-500;
53 maxlag=0; 53 maxlag=0;
54 pos=0; 54 pos=0;
55 55
56 /* Find scale value and start position */ 56 /* Find scale value and start position */
57 if (step==1) { 57 if (step==1) {
58 max=WebRtcSpl_MaxAbsValueW16(regressor, (int16_t)(subl+searchLen-1)); 58 max=WebRtcSpl_MaxAbsValueW16(regressor, (int16_t)(subl+searchLen-1));
59 rp_beg = regressor; 59 rp_beg = regressor;
60 rp_end = &regressor[subl]; 60 rp_end = regressor + subl;
61 } else { /* step==-1 */ 61 } else { /* step==-1 */
62 max=WebRtcSpl_MaxAbsValueW16(&regressor[-searchLen], (int16_t)(subl+searchLe n-1)); 62 max = WebRtcSpl_MaxAbsValueW16(regressor - searchLen,
63 rp_beg = &regressor[-1]; 63 (int16_t)(subl + searchLen - 1));
64 rp_end = &regressor[subl-1]; 64 rp_beg = regressor - 1;
65 rp_end = regressor + subl - 1;
65 } 66 }
66 67
67 /* Introduce a scale factor on the Energy in int32_t in 68 /* Introduce a scale factor on the Energy in int32_t in
68 order to make sure that the calculation does not 69 order to make sure that the calculation does not
69 overflow */ 70 overflow */
70 71
71 if (max>5000) { 72 if (max>5000) {
72 shifts=2; 73 shifts=2;
73 } else { 74 } else {
74 shifts=0; 75 shifts=0;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 pos+=step; 132 pos+=step;
132 133
133 /* Do a +/- to get the next energy */ 134 /* Do a +/- to get the next energy */
134 Energy += step * ((*rp_end * *rp_end - *rp_beg * *rp_beg) >> shifts); 135 Energy += step * ((*rp_end * *rp_end - *rp_beg * *rp_beg) >> shifts);
135 rp_beg+=step; 136 rp_beg+=step;
136 rp_end+=step; 137 rp_end+=step;
137 } 138 }
138 139
139 return(maxlag+offset); 140 return(maxlag+offset);
140 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698