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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h

Issue 1179953003: Revert "Upconvert various types to int." (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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // in fact it outputs 32000 Hz. This is the iSAC fullband mode. 177 // in fact it outputs 32000 Hz. This is the iSAC fullband mode.
178 if (sample_rate_hz == 48000) 178 if (sample_rate_hz == 48000)
179 sample_rate_hz = 32000; 179 sample_rate_hz = 32000;
180 CHECK(sample_rate_hz == 16000 || sample_rate_hz == 32000) 180 CHECK(sample_rate_hz == 16000 || sample_rate_hz == 32000)
181 << "Unsupported sample rate " << sample_rate_hz; 181 << "Unsupported sample rate " << sample_rate_hz;
182 if (sample_rate_hz != decoder_sample_rate_hz_) { 182 if (sample_rate_hz != decoder_sample_rate_hz_) {
183 CHECK_EQ(0, T::SetDecSampRate(isac_state_, sample_rate_hz)); 183 CHECK_EQ(0, T::SetDecSampRate(isac_state_, sample_rate_hz));
184 decoder_sample_rate_hz_ = sample_rate_hz; 184 decoder_sample_rate_hz_ = sample_rate_hz;
185 } 185 }
186 int16_t temp_type = 1; // Default is speech. 186 int16_t temp_type = 1; // Default is speech.
187 int ret = 187 int16_t ret =
188 T::DecodeInternal(isac_state_, encoded, static_cast<int16_t>(encoded_len), 188 T::DecodeInternal(isac_state_, encoded, static_cast<int16_t>(encoded_len),
189 decoded, &temp_type); 189 decoded, &temp_type);
190 *speech_type = ConvertSpeechType(temp_type); 190 *speech_type = ConvertSpeechType(temp_type);
191 return ret; 191 return ret;
192 } 192 }
193 193
194 template <typename T> 194 template <typename T>
195 bool AudioEncoderDecoderIsacT<T>::HasDecodePlc() const { 195 bool AudioEncoderDecoderIsacT<T>::HasDecodePlc() const {
196 return false; 196 return false;
197 } 197 }
(...skipping 24 matching lines...) Expand all
222 222
223 template <typename T> 223 template <typename T>
224 int AudioEncoderDecoderIsacT<T>::ErrorCode() { 224 int AudioEncoderDecoderIsacT<T>::ErrorCode() {
225 CriticalSectionScoped cs(state_lock_.get()); 225 CriticalSectionScoped cs(state_lock_.get());
226 return T::GetErrorCode(isac_state_); 226 return T::GetErrorCode(isac_state_);
227 } 227 }
228 228
229 } // namespace webrtc 229 } // namespace webrtc
230 230
231 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_ 231 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698