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

Side by Side Diff: webrtc/modules/audio_processing/aec3/aec3_common.h

Issue 3009273002: Lowered the allowed jitter in the api calls to a reasonable level (Closed)
Patch Set: Created 3 years, 3 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 constexpr size_t kDownsampledRenderBufferSize = 57 constexpr size_t kDownsampledRenderBufferSize =
58 kSubBlockSize * 58 kSubBlockSize *
59 (kMatchedFilterAlignmentShiftSizeSubBlocks * kNumMatchedFilters + 59 (kMatchedFilterAlignmentShiftSizeSubBlocks * kNumMatchedFilters +
60 kMatchedFilterWindowSizeSubBlocks + 60 kMatchedFilterWindowSizeSubBlocks +
61 1); 61 1);
62 62
63 constexpr size_t kRenderDelayBufferSize = 63 constexpr size_t kRenderDelayBufferSize =
64 (3 * kDownsampledRenderBufferSize) / (4 * kSubBlockSize); 64 (3 * kDownsampledRenderBufferSize) / (4 * kSubBlockSize);
65 65
66 constexpr size_t kMinEchoPathDelayBlocks = 5; 66 constexpr size_t kMinEchoPathDelayBlocks = 5;
67 constexpr size_t kMaxApiCallsJitterBlocks = 60; 67 constexpr size_t kMaxApiCallsJitterBlocks = 26;
68 constexpr size_t kRenderTransferQueueSize = kMaxApiCallsJitterBlocks / 2; 68 constexpr size_t kRenderTransferQueueSize = kMaxApiCallsJitterBlocks / 2;
69 static_assert(2 * kRenderTransferQueueSize >= kMaxApiCallsJitterBlocks, 69 static_assert(2 * kRenderTransferQueueSize >= kMaxApiCallsJitterBlocks,
70 "Requirement to ensure buffer overflow detection"); 70 "Requirement to ensure buffer overflow detection");
71 71
72 // TODO(peah): Integrate this with how it is done inside audio_processing_impl. 72 // TODO(peah): Integrate this with how it is done inside audio_processing_impl.
73 constexpr size_t NumBandsForRate(int sample_rate_hz) { 73 constexpr size_t NumBandsForRate(int sample_rate_hz) {
74 return static_cast<size_t>(sample_rate_hz == 8000 ? 1 74 return static_cast<size_t>(sample_rate_hz == 8000 ? 1
75 : sample_rate_hz / 16000); 75 : sample_rate_hz / 16000);
76 } 76 }
77 constexpr int LowestBandRate(int sample_rate_hz) { 77 constexpr int LowestBandRate(int sample_rate_hz) {
(...skipping 28 matching lines...) Expand all
106 static_assert(ValidFullBandRate(32000), 106 static_assert(ValidFullBandRate(32000),
107 "Test that 32 kHz is a valid sample rate"); 107 "Test that 32 kHz is a valid sample rate");
108 static_assert(ValidFullBandRate(48000), 108 static_assert(ValidFullBandRate(48000),
109 "Test that 48 kHz is a valid sample rate"); 109 "Test that 48 kHz is a valid sample rate");
110 static_assert(!ValidFullBandRate(8001), 110 static_assert(!ValidFullBandRate(8001),
111 "Test that 8001 Hz is not a valid sample rate"); 111 "Test that 8001 Hz is not a valid sample rate");
112 112
113 } // namespace webrtc 113 } // namespace webrtc
114 114
115 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ 115 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_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