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

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

Issue 1227213002: Update audio code to use size_t more correctly, webrtc/modules/audio_processing/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 4 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.c » ('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
11 /* 11 /*
12 * Specifies the interface for the AEC core. 12 * Specifies the interface for the AEC core.
13 */ 13 */
14 14
15 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_ 15 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
16 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_ 16 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_
17 17
18 #include <stddef.h>
19
18 #include "webrtc/typedefs.h" 20 #include "webrtc/typedefs.h"
19 21
20 #define FRAME_LEN 80 22 #define FRAME_LEN 80
21 #define PART_LEN 64 // Length of partition 23 #define PART_LEN 64 // Length of partition
22 #define PART_LEN1 (PART_LEN + 1) // Unique fft coefficients 24 #define PART_LEN1 (PART_LEN + 1) // Unique fft coefficients
23 #define PART_LEN2 (PART_LEN * 2) // Length of partition * 2 25 #define PART_LEN2 (PART_LEN * 2) // Length of partition * 2
24 #define NUM_HIGH_BANDS_MAX 2 // Max number of high bands 26 #define NUM_HIGH_BANDS_MAX 2 // Max number of high bands
25 27
26 typedef float complex_t[2]; 28 typedef float complex_t[2];
27 // For performance reasons, some arrays of complex numbers are replaced by twice 29 // For performance reasons, some arrays of complex numbers are replaced by twice
(...skipping 30 matching lines...) Expand all
58 #if defined(MIPS_FPU_LE) 60 #if defined(MIPS_FPU_LE)
59 void WebRtcAec_InitAec_mips(void); 61 void WebRtcAec_InitAec_mips(void);
60 #endif 62 #endif
61 #if defined(WEBRTC_DETECT_NEON) || defined(WEBRTC_HAS_NEON) 63 #if defined(WEBRTC_DETECT_NEON) || defined(WEBRTC_HAS_NEON)
62 void WebRtcAec_InitAec_neon(void); 64 void WebRtcAec_InitAec_neon(void);
63 #endif 65 #endif
64 66
65 void WebRtcAec_BufferFarendPartition(AecCore* aec, const float* farend); 67 void WebRtcAec_BufferFarendPartition(AecCore* aec, const float* farend);
66 void WebRtcAec_ProcessFrames(AecCore* aec, 68 void WebRtcAec_ProcessFrames(AecCore* aec,
67 const float* const* nearend, 69 const float* const* nearend,
68 int num_bands, 70 size_t num_bands,
69 int num_samples, 71 size_t num_samples,
70 int knownDelay, 72 int knownDelay,
71 float* const* out); 73 float* const* out);
72 74
73 // A helper function to call WebRtc_MoveReadPtr() for all far-end buffers. 75 // A helper function to call WebRtc_MoveReadPtr() for all far-end buffers.
74 // Returns the number of elements moved, and adjusts |system_delay| by the 76 // Returns the number of elements moved, and adjusts |system_delay| by the
75 // corresponding amount in ms. 77 // corresponding amount in ms.
76 int WebRtcAec_MoveFarReadPtr(AecCore* aec, int elements); 78 int WebRtcAec_MoveFarReadPtr(AecCore* aec, int elements);
77 79
78 // Calculates the median, standard deviation and amount of poor values among the 80 // Calculates the median, standard deviation and amount of poor values among the
79 // delay estimates aggregated up to the first call to the function. After that 81 // delay estimates aggregated up to the first call to the function. After that
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Returns the current |system_delay|, i.e., the buffered difference between 120 // Returns the current |system_delay|, i.e., the buffered difference between
119 // far-end and near-end. 121 // far-end and near-end.
120 int WebRtcAec_system_delay(AecCore* self); 122 int WebRtcAec_system_delay(AecCore* self);
121 123
122 // Sets the |system_delay| to |value|. Note that if the value is changed 124 // Sets the |system_delay| to |value|. Note that if the value is changed
123 // improperly, there can be a performance regression. So it should be used with 125 // improperly, there can be a performance regression. So it should be used with
124 // care. 126 // care.
125 void WebRtcAec_SetSystemDelay(AecCore* self, int delay); 127 void WebRtcAec_SetSystemDelay(AecCore* self, int delay);
126 128
127 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_AEC_CORE_H_ 129 #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.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698