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

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

Issue 1181073002: Reland "Upconvert various types to int.", neteq portion. (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
« no previous file with comments | « webrtc/modules/audio_coding/neteq/merge.cc ('k') | webrtc/modules/audio_coding/neteq/normal.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 assert(decoder); // At this point, we must have a decoder object. 1271 assert(decoder); // At this point, we must have a decoder object.
1272 // The number of channels in the |sync_buffer_| should be the same as the 1272 // The number of channels in the |sync_buffer_| should be the same as the
1273 // number decoder channels. 1273 // number decoder channels.
1274 assert(sync_buffer_->Channels() == decoder->Channels()); 1274 assert(sync_buffer_->Channels() == decoder->Channels());
1275 assert(decoded_buffer_length_ >= kMaxFrameSize * decoder->Channels()); 1275 assert(decoded_buffer_length_ >= kMaxFrameSize * decoder->Channels());
1276 assert(*operation == kNormal || *operation == kAccelerate || 1276 assert(*operation == kNormal || *operation == kAccelerate ||
1277 *operation == kFastAccelerate || *operation == kMerge || 1277 *operation == kFastAccelerate || *operation == kMerge ||
1278 *operation == kPreemptiveExpand); 1278 *operation == kPreemptiveExpand);
1279 packet_list->pop_front(); 1279 packet_list->pop_front();
1280 size_t payload_length = packet->payload_length; 1280 size_t payload_length = packet->payload_length;
1281 int16_t decode_length; 1281 int decode_length;
1282 if (packet->sync_packet) { 1282 if (packet->sync_packet) {
1283 // Decode to silence with the same frame size as the last decode. 1283 // Decode to silence with the same frame size as the last decode.
1284 LOG(LS_VERBOSE) << "Decoding sync-packet: " << 1284 LOG(LS_VERBOSE) << "Decoding sync-packet: " <<
1285 " ts=" << packet->header.timestamp << 1285 " ts=" << packet->header.timestamp <<
1286 ", sn=" << packet->header.sequenceNumber << 1286 ", sn=" << packet->header.sequenceNumber <<
1287 ", pt=" << static_cast<int>(packet->header.payloadType) << 1287 ", pt=" << static_cast<int>(packet->header.payloadType) <<
1288 ", ssrc=" << packet->header.ssrc << 1288 ", ssrc=" << packet->header.ssrc <<
1289 ", len=" << packet->payload_length; 1289 ", len=" << packet->payload_length;
1290 memset(&decoded_buffer_[*decoded_length], 0, 1290 memset(&decoded_buffer_[*decoded_length], 0,
1291 decoder_frame_length_ * decoder->Channels() * 1291 decoder_frame_length_ * decoder->Channels() *
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 1993
1994 void NetEqImpl::CreateDecisionLogic() { 1994 void NetEqImpl::CreateDecisionLogic() {
1995 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, 1995 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_,
1996 playout_mode_, 1996 playout_mode_,
1997 decoder_database_.get(), 1997 decoder_database_.get(),
1998 *packet_buffer_.get(), 1998 *packet_buffer_.get(),
1999 delay_manager_.get(), 1999 delay_manager_.get(),
2000 buffer_level_filter_.get())); 2000 buffer_level_filter_.get()));
2001 } 2001 }
2002 } // namespace webrtc 2002 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/merge.cc ('k') | webrtc/modules/audio_coding/neteq/normal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698