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

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

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync 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 11 matching lines...) Expand all
22 * by step wise adding and subtracting the next 22 * by step wise adding and subtracting the next
23 * sample and the last sample respectively */ 23 * sample and the last sample respectively */
24 void WebRtcIlbcfix_CbMemEnergyCalc( 24 void WebRtcIlbcfix_CbMemEnergyCalc(
25 int32_t energy, /* (i) input start energy */ 25 int32_t energy, /* (i) input start energy */
26 int16_t range, /* (i) number of iterations */ 26 int16_t range, /* (i) number of iterations */
27 int16_t *ppi, /* (i) input pointer 1 */ 27 int16_t *ppi, /* (i) input pointer 1 */
28 int16_t *ppo, /* (i) input pointer 2 */ 28 int16_t *ppo, /* (i) input pointer 2 */
29 int16_t *energyW16, /* (o) Energy in the CB vectors */ 29 int16_t *energyW16, /* (o) Energy in the CB vectors */
30 int16_t *energyShifts, /* (o) Shift value of the energy */ 30 int16_t *energyShifts, /* (o) Shift value of the energy */
31 int16_t scale, /* (i) The scaling of all energy values */ 31 int16_t scale, /* (i) The scaling of all energy values */
32 int16_t base_size /* (i) Index to where the energy values should be stored */ 32 int16_t base_size /* (i) Index to where energy values should be stored */
33 ) 33 )
34 { 34 {
35 int16_t j,shft; 35 int16_t j,shft;
36 int32_t tmp; 36 int32_t tmp;
37 int16_t *eSh_ptr; 37 int16_t *eSh_ptr;
38 int16_t *eW16_ptr; 38 int16_t *eW16_ptr;
39 39
40 40
41 eSh_ptr = &energyShifts[1+base_size]; 41 eSh_ptr = &energyShifts[1+base_size];
42 eW16_ptr = &energyW16[1+base_size]; 42 eW16_ptr = &energyW16[1+base_size];
(...skipping 12 matching lines...) Expand all
55 /* Normalize the energy into a int16_t and store 55 /* Normalize the energy into a int16_t and store
56 the number of shifts */ 56 the number of shifts */
57 57
58 shft = (int16_t)WebRtcSpl_NormW32(energy); 58 shft = (int16_t)WebRtcSpl_NormW32(energy);
59 *eSh_ptr++ = shft; 59 *eSh_ptr++ = shft;
60 60
61 tmp = energy << shft; 61 tmp = energy << shft;
62 *eW16_ptr++ = (int16_t)(tmp >> 16); 62 *eW16_ptr++ = (int16_t)(tmp >> 16);
63 } 63 }
64 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698