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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/bandwidth_estimator.c

Issue 1168753002: Match existing type usage better. (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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 /* don't allow it to be less than frame rate - 10 ms */ 369 /* don't allow it to be less than frame rate - 10 ms */
370 if (arrTimeDiff < frameSizeSampl - FRAMESAMPLES_10ms) { 370 if (arrTimeDiff < frameSizeSampl - FRAMESAMPLES_10ms) {
371 arrTimeDiff = frameSizeSampl - FRAMESAMPLES_10ms; 371 arrTimeDiff = frameSizeSampl - FRAMESAMPLES_10ms;
372 } 372 }
373 373
374 /* compute inverse receiving rate for last packet, in Q19 */ 374 /* compute inverse receiving rate for last packet, in Q19 */
375 numBytesInv = (uint16_t) WebRtcSpl_DivW32W16( 375 numBytesInv = (uint16_t) WebRtcSpl_DivW32W16(
376 524288 + ((pksize + HEADER_SIZE) >> 1), 376 524288 + ((pksize + HEADER_SIZE) >> 1),
377 pksize + HEADER_SIZE); 377 (int16_t)(pksize + HEADER_SIZE));
378 378
379 /* 8389 is ~ 1/128000 in Q30 */ 379 /* 8389 is ~ 1/128000 in Q30 */
380 byteSecondsPerBit = (uint32_t)(arrTimeDiff * 8389); 380 byteSecondsPerBit = (uint32_t)(arrTimeDiff * 8389);
381 381
382 /* get upper N bits */ 382 /* get upper N bits */
383 tempUpper = WEBRTC_SPL_RSHIFT_U32(byteSecondsPerBit, 15); 383 tempUpper = WEBRTC_SPL_RSHIFT_U32(byteSecondsPerBit, 15);
384 384
385 /* get lower 15 bits */ 385 /* get lower 15 bits */
386 tempLower = byteSecondsPerBit & 0x00007FFF; 386 tempLower = byteSecondsPerBit & 0x00007FFF;
387 387
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 /*s2nr = -1*(a_60 << 10) + ((b_60 * bottle_neck) >> 10);*/ 1017 /*s2nr = -1*(a_60 << 10) + ((b_60 * bottle_neck) >> 10);*/
1018 s2nr = -22500 + (int16_t)(500 * bottle_neck >> 10); 1018 s2nr = -22500 + (int16_t)(500 * bottle_neck >> 10);
1019 break; 1019 break;
1020 default: 1020 default:
1021 s2nr = -1; /* Error */ 1021 s2nr = -1; /* Error */
1022 } 1022 }
1023 1023
1024 return s2nr; //return in Q10 1024 return s2nr; //return in Q10
1025 1025
1026 } 1026 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c ('k') | webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698