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

Side by Side Diff: webrtc/modules/audio_coding/neteq/timestamp_scaler.cc

Issue 1404463003: Delete iSAC-fb from NetEq (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove-isac-fb
Patch Set: Created 5 years, 2 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 switch (info->codec_type) { 46 switch (info->codec_type) {
47 case kDecoderG722: 47 case kDecoderG722:
48 case kDecoderG722_2ch: { 48 case kDecoderG722_2ch: {
49 // Use timestamp scaling with factor 2 (two output samples per RTP 49 // Use timestamp scaling with factor 2 (two output samples per RTP
50 // timestamp). 50 // timestamp).
51 numerator_ = 2; 51 numerator_ = 2;
52 denominator_ = 1; 52 denominator_ = 1;
53 break; 53 break;
54 } 54 }
55 case kDecoderISACfb:
56 case kDecoderCNGswb48kHz: { 55 case kDecoderCNGswb48kHz: {
57 // Use timestamp scaling with factor 2/3 (32 kHz sample rate, but RTP 56 // Use timestamp scaling with factor 2/3 (32 kHz sample rate, but RTP
58 // timestamps run on 48 kHz). 57 // timestamps run on 48 kHz).
59 // TODO(tlegrand): Remove scaling for kDecoderCNGswb48kHz once ACM has 58 // TODO(tlegrand): Remove scaling for kDecoderCNGswb48kHz once ACM has
60 // full 48 kHz support. 59 // full 48 kHz support.
61 numerator_ = 2; 60 numerator_ = 2;
62 denominator_ = 3; 61 denominator_ = 3;
63 break; 62 break;
64 } 63 }
65 case kDecoderAVT: 64 case kDecoderAVT:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } else { 104 } else {
106 int32_t internal_diff = internal_timestamp - internal_ref_; 105 int32_t internal_diff = internal_timestamp - internal_ref_;
107 assert(numerator_ > 0); // Should not be possible. 106 assert(numerator_ > 0); // Should not be possible.
108 // Do not update references in this method. 107 // Do not update references in this method.
109 // Switch |denominator_| and |numerator_| to convert the other way. 108 // Switch |denominator_| and |numerator_| to convert the other way.
110 return external_ref_ + (internal_diff * denominator_) / numerator_; 109 return external_ref_ + (internal_diff * denominator_) / numerator_;
111 } 110 }
112 } 111 }
113 112
114 } // namespace webrtc 113 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698