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

Side by Side Diff: webrtc/modules/audio_processing/aec/aec_core.h

Issue 2311833002: Refactoring of the buffering of the nearend signal done inside the AEC (Closed)
Patch Set: Rebase Created 4 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 | webrtc/modules/audio_processing/aec/aec_core.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 std::unique_ptr<ApmDataDumper> data_dumper; 121 std::unique_ptr<ApmDataDumper> data_dumper;
122 122
123 CoherenceState coherence_state; 123 CoherenceState coherence_state;
124 124
125 int farBufWritePos, farBufReadPos; 125 int farBufWritePos, farBufReadPos;
126 126
127 int knownDelay; 127 int knownDelay;
128 int inSamples, outSamples; 128 int inSamples, outSamples;
129 int delayEstCtr; 129 int delayEstCtr;
130 130
131 RingBuffer* nearFrBuf; 131 // Nearend buffer used for changing from FRAME_LEN to PART_LEN sample block
132 // sizes. The buffer stores all the incoming bands and for each band a maximum
133 // of PART_LEN - (FRAME_LEN - PART_LEN) values need to be buffered in order to
134 // change the block size from FRAME_LEN to PART_LEN.
135 float nearend_buffer[NUM_HIGH_BANDS_MAX + 1]
136 [PART_LEN - (FRAME_LEN - PART_LEN)];
137 int nearend_buffer_size;
132 RingBuffer* outFrBuf; 138 RingBuffer* outFrBuf;
133 139
134 RingBuffer* nearFrBufH[NUM_HIGH_BANDS_MAX];
135 RingBuffer* outFrBufH[NUM_HIGH_BANDS_MAX]; 140 RingBuffer* outFrBufH[NUM_HIGH_BANDS_MAX];
136 141
137 float dBuf[PART_LEN2]; // nearend
138 float eBuf[PART_LEN2]; // error 142 float eBuf[PART_LEN2]; // error
139 143
140 float dBufH[NUM_HIGH_BANDS_MAX][PART_LEN2]; // nearend 144 float previous_nearend_block[NUM_HIGH_BANDS_MAX + 1][PART_LEN];
141 145
142 float xPow[PART_LEN1]; 146 float xPow[PART_LEN1];
143 float dPow[PART_LEN1]; 147 float dPow[PART_LEN1];
144 float dMinPow[PART_LEN1]; 148 float dMinPow[PART_LEN1];
145 float dInitMinPow[PART_LEN1]; 149 float dInitMinPow[PART_LEN1];
146 float* noisePow; 150 float* noisePow;
147 151
148 float xfBuf[2][kExtendedNumPartitions * PART_LEN1]; // farend fft buffer 152 float xfBuf[2][kExtendedNumPartitions * PART_LEN1]; // farend fft buffer
149 float wfBuf[2][kExtendedNumPartitions * PART_LEN1]; // filter fft 153 float wfBuf[2][kExtendedNumPartitions * PART_LEN1]; // filter fft
150 // Farend windowed fft buffer. 154 // Farend windowed fft buffer.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 int WebRtcAec_system_delay(AecCore* self); 317 int WebRtcAec_system_delay(AecCore* self);
314 318
315 // Sets the |system_delay| to |value|. Note that if the value is changed 319 // Sets the |system_delay| to |value|. Note that if the value is changed
316 // improperly, there can be a performance regression. So it should be used with 320 // improperly, there can be a performance regression. So it should be used with
317 // care. 321 // care.
318 void WebRtcAec_SetSystemDelay(AecCore* self, int delay); 322 void WebRtcAec_SetSystemDelay(AecCore* self, int delay);
319 323
320 } // namespace webrtc 324 } // namespace webrtc
321 325
322 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_ 326 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec/aec_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698