| Index: webrtc/common_audio/real_fourier_ooura.cc
|
| diff --git a/webrtc/common_audio/real_fourier_ooura.cc b/webrtc/common_audio/real_fourier_ooura.cc
|
| index 6f76516432186d66b1a972921fc557141cbc6949..1c4004dea77adaeb1d693c5aac06fdbc4b4b9c31 100644
|
| --- a/webrtc/common_audio/real_fourier_ooura.cc
|
| +++ b/webrtc/common_audio/real_fourier_ooura.cc
|
| @@ -22,12 +22,12 @@ using std::complex;
|
|
|
| namespace {
|
|
|
| -void Conjugate(complex<float>* array, int complex_length) {
|
| +void Conjugate(complex<float>* array, size_t complex_length) {
|
| std::for_each(array, array + complex_length,
|
| [=](complex<float>& v) { v = std::conj(v); });
|
| }
|
|
|
| -size_t ComputeWorkIpSize(int fft_length) {
|
| +size_t ComputeWorkIpSize(size_t fft_length) {
|
| return static_cast<size_t>(2 + std::ceil(std::sqrt(
|
| static_cast<float>(fft_length))));
|
| }
|
| @@ -40,7 +40,7 @@ RealFourierOoura::RealFourierOoura(int fft_order)
|
| complex_length_(ComplexLength(order_)),
|
| // Zero-initializing work_ip_ will cause rdft to initialize these work
|
| // arrays on the first call.
|
| - work_ip_(new int[ComputeWorkIpSize(length_)]()),
|
| + work_ip_(new size_t[ComputeWorkIpSize(length_)]()),
|
| work_w_(new float[complex_length_]()) {
|
| CHECK_GE(fft_order, 1);
|
| }
|
| @@ -66,7 +66,7 @@ void RealFourierOoura::Inverse(const complex<float>* src, float* dest) const {
|
| auto dest_complex = reinterpret_cast<complex<float>*>(dest);
|
| // The real output array is shorter than the input complex array by one
|
| // complex element.
|
| - const int dest_complex_length = complex_length_ - 1;
|
| + const size_t dest_complex_length = complex_length_ - 1;
|
| std::copy(src, src + dest_complex_length, dest_complex);
|
| // Restore Ooura's conjugate definition.
|
| Conjugate(dest_complex, dest_complex_length);
|
|
|