OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 // Compute convolution of |k1| and |k2| over |input_ptr|, resultant sums are | 101 // Compute convolution of |k1| and |k2| over |input_ptr|, resultant sums are |
102 // linearly interpolated using |kernel_interpolation_factor|. On x86 and ARM | 102 // linearly interpolated using |kernel_interpolation_factor|. On x86 and ARM |
103 // the underlying implementation is chosen at run time. | 103 // the underlying implementation is chosen at run time. |
104 static float Convolve_C(const float* input_ptr, const float* k1, | 104 static float Convolve_C(const float* input_ptr, const float* k1, |
105 const float* k2, double kernel_interpolation_factor); | 105 const float* k2, double kernel_interpolation_factor); |
106 #if defined(WEBRTC_ARCH_X86_FAMILY) | 106 #if defined(WEBRTC_ARCH_X86_FAMILY) |
107 static float Convolve_SSE(const float* input_ptr, const float* k1, | 107 static float Convolve_SSE(const float* input_ptr, const float* k1, |
108 const float* k2, | 108 const float* k2, |
109 double kernel_interpolation_factor); | 109 double kernel_interpolation_factor); |
110 #elif defined(WEBRTC_DETECT_NEON) || defined(WEBRTC_HAS_NEON) | 110 #elif defined(WEBRTC_HAS_NEON) |
111 static float Convolve_NEON(const float* input_ptr, const float* k1, | 111 static float Convolve_NEON(const float* input_ptr, const float* k1, |
112 const float* k2, | 112 const float* k2, |
113 double kernel_interpolation_factor); | 113 double kernel_interpolation_factor); |
114 #endif | 114 #endif |
115 | 115 |
116 // The ratio of input / output sample rates. | 116 // The ratio of input / output sample rates. |
117 double io_sample_rate_ratio_; | 117 double io_sample_rate_ratio_; |
118 | 118 |
119 // An index on the source input buffer with sub-sample precision. It must be | 119 // An index on the source input buffer with sub-sample precision. It must be |
120 // double precision to avoid drift. | 120 // double precision to avoid drift. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 float* const r2_; | 162 float* const r2_; |
163 float* r3_; | 163 float* r3_; |
164 float* r4_; | 164 float* r4_; |
165 | 165 |
166 RTC_DISALLOW_COPY_AND_ASSIGN(SincResampler); | 166 RTC_DISALLOW_COPY_AND_ASSIGN(SincResampler); |
167 }; | 167 }; |
168 | 168 |
169 } // namespace webrtc | 169 } // namespace webrtc |
170 | 170 |
171 #endif // WEBRTC_COMMON_AUDIO_RESAMPLER_SINC_RESAMPLER_H_ | 171 #endif // WEBRTC_COMMON_AUDIO_RESAMPLER_SINC_RESAMPLER_H_ |
OLD | NEW |