OLD | NEW |
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 #include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h" | 10 #include "webrtc/modules/audio_processing/aec3/cascaded_biquad_filter.h" |
11 | 11 |
12 #include "webrtc/rtc_base/checks.h" | 12 #include "webrtc/base/checks.h" |
13 | 13 |
14 namespace webrtc { | 14 namespace webrtc { |
15 | 15 |
16 CascadedBiQuadFilter::CascadedBiQuadFilter( | 16 CascadedBiQuadFilter::CascadedBiQuadFilter( |
17 const CascadedBiQuadFilter::BiQuadCoefficients& coefficients, | 17 const CascadedBiQuadFilter::BiQuadCoefficients& coefficients, |
18 size_t num_biquads) | 18 size_t num_biquads) |
19 : biquad_states_(num_biquads), coefficients_(coefficients) {} | 19 : biquad_states_(num_biquads), coefficients_(coefficients) {} |
20 | 20 |
21 CascadedBiQuadFilter::~CascadedBiQuadFilter() = default; | 21 CascadedBiQuadFilter::~CascadedBiQuadFilter() = default; |
22 | 22 |
(...skipping 26 matching lines...) Expand all Loading... |
49 y[k] = c_b[0] * tmp + c_b[1] * m_x[0] + c_b[2] * m_x[1] - c_a[0] * m_y[0] - | 49 y[k] = c_b[0] * tmp + c_b[1] * m_x[0] + c_b[2] * m_x[1] - c_a[0] * m_y[0] - |
50 c_a[1] * m_y[1]; | 50 c_a[1] * m_y[1]; |
51 m_x[1] = m_x[0]; | 51 m_x[1] = m_x[0]; |
52 m_x[0] = tmp; | 52 m_x[0] = tmp; |
53 m_y[1] = m_y[0]; | 53 m_y[1] = m_y[0]; |
54 m_y[0] = y[k]; | 54 m_y[0] = y[k]; |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 } // namespace webrtc | 58 } // namespace webrtc |
OLD | NEW |