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

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

Issue 1947453002: Reducing neteq sync buffer size. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override; 203 std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override;
204 204
205 // This accessor method is only intended for testing purposes. 205 // This accessor method is only intended for testing purposes.
206 const SyncBuffer* sync_buffer_for_test() const; 206 const SyncBuffer* sync_buffer_for_test() const;
207 Operations last_operation_for_test() const; 207 Operations last_operation_for_test() const;
208 208
209 protected: 209 protected:
210 static const int kOutputSizeMs = 10; 210 static const int kOutputSizeMs = 10;
211 static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz. 211 static const size_t kMaxFrameSize = 5760; // 120 ms @ 48 kHz.
212 // TODO(hlundin): Provide a better value for kSyncBufferSize. 212 // TODO(hlundin): Provide a better value for kSyncBufferSize.
213 static const size_t kSyncBufferSize = 2 * kMaxFrameSize; 213 // Current value is kMaxFrameSize + 60 ms * 48 kHz, which is enough for
214 // calculating correlations of current frame against history.
215 static const size_t kSyncBufferSize = kMaxFrameSize + 60 * 48;
214 216
215 // Inserts a new packet into NetEq. This is used by the InsertPacket method 217 // Inserts a new packet into NetEq. This is used by the InsertPacket method
216 // above. Returns 0 on success, otherwise an error code. 218 // above. Returns 0 on success, otherwise an error code.
217 // TODO(hlundin): Merge this with InsertPacket above? 219 // TODO(hlundin): Merge this with InsertPacket above?
218 int InsertPacketInternal(const WebRtcRTPHeader& rtp_header, 220 int InsertPacketInternal(const WebRtcRTPHeader& rtp_header,
219 rtc::ArrayView<const uint8_t> payload, 221 rtc::ArrayView<const uint8_t> payload,
220 uint32_t receive_timestamp, 222 uint32_t receive_timestamp,
221 bool is_sync_packet) 223 bool is_sync_packet)
222 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 224 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
223 225
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 bool nack_enabled_ GUARDED_BY(crit_sect_); 407 bool nack_enabled_ GUARDED_BY(crit_sect_);
406 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) = 408 AudioFrame::VADActivity last_vad_activity_ GUARDED_BY(crit_sect_) =
407 AudioFrame::kVadPassive; 409 AudioFrame::kVadPassive;
408 410
409 private: 411 private:
410 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl); 412 RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl);
411 }; 413 };
412 414
413 } // namespace webrtc 415 } // namespace webrtc
414 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_ 416 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698