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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 for (i=0;i<HALF_SUBFRAMELEN;i++) 272 for (i=0;i<HALF_SUBFRAMELEN;i++)
273 { 273 {
274 274
275 tmp32 = lat_inQ25[i + temp1] << 1; // Q25->Q26 275 tmp32 = lat_inQ25[i + temp1] << 1; // Q25->Q26
276 tmp32 = WEBRTC_SPL_MUL_16_32_RSFT16(inv_gain16, tmp32); //lat_in[]*inv_gai n in (Q(18-sh)*Q26)>>16 = Q(28-sh) 276 tmp32 = WEBRTC_SPL_MUL_16_32_RSFT16(inv_gain16, tmp32); //lat_in[]*inv_gai n in (Q(18-sh)*Q26)>>16 = Q(28-sh)
277 tmp32 = WEBRTC_SPL_SHIFT_W32(tmp32, -(28-sh)); // lat_in[]*inv_gain in Q0 277 tmp32 = WEBRTC_SPL_SHIFT_W32(tmp32, -(28-sh)); // lat_in[]*inv_gain in Q0
278 278
279 ARfQ0vec[i] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 279 ARfQ0vec[i] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0
280 } 280 }
281 281
282 for (i=orderCoef-1;i>=0;i--) //get the state of f&g for the first input, for all orders 282 // Get the state of f & g for the first input, for all orders.
283 for (i = orderCoef - 1; i >= 0; i--)
283 { 284 {
kwiberg-webrtc 2015/06/10 11:58:32 Consider moving opening brace to line 283 while yo
284 tmp32 = (cthQ15[i] * ARfQ0vec[0] - sthQ15[i] * stateGQ0[i] + 16384) >> 15; 285 tmp32 = (cthQ15[i] * ARfQ0vec[0] - sthQ15[i] * stateGQ0[i] + 16384) >> 15;
285 tmpAR = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 286 tmpAR = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0
286 287
287 tmp32 = (sthQ15[i] * ARfQ0vec[0] + cthQ15[i] * stateGQ0[i] + 16384) >> 15; 288 tmp32 = (sthQ15[i] * ARfQ0vec[0] + cthQ15[i] * stateGQ0[i] + 16384) >> 15;
288 ARgQ0vec[i+1] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0 289 ARgQ0vec[i+1] = (int16_t)WebRtcSpl_SatW32ToW16(tmp32); // Q0
289 ARfQ0vec[0] = tmpAR; 290 ARfQ0vec[0] = tmpAR;
290 } 291 }
291 ARgQ0vec[0] = ARfQ0vec[0]; 292 ARgQ0vec[0] = ARfQ0vec[0];
292 293
293 // Filter ARgQ0vec[] and ARfQ0vec[] through coefficients cthQ15[] and sthQ15 []. 294 // Filter ARgQ0vec[] and ARfQ0vec[] through coefficients cthQ15[] and sthQ15 [].
294 WebRtcIsacfix_FilterArLoop(ARgQ0vec, ARfQ0vec, cthQ15, sthQ15, orderCoef); 295 WebRtcIsacfix_FilterArLoop(ARgQ0vec, ARfQ0vec, cthQ15, sthQ15, orderCoef);
295 296
296 for(n=0;n<HALF_SUBFRAMELEN;n++) 297 for(n=0;n<HALF_SUBFRAMELEN;n++)
297 { 298 {
298 lat_outQ0[n + temp1] = ARfQ0vec[n]; 299 lat_outQ0[n + temp1] = ARfQ0vec[n];
299 } 300 }
300 301
301 302
302 /* cannot use memcpy in the following */ 303 /* cannot use memcpy in the following */
303 304
304 for (i=0;i<ord_1;i++) 305 for (i=0;i<ord_1;i++)
305 { 306 {
306 stateGQ0[i] = ARgQ0vec[i]; 307 stateGQ0[i] = ARgQ0vec[i];
307 } 308 }
308 } 309 }
309 310
310 return; 311 return;
311 } 312 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698