OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Initial input buffer layout, dividing into regions r0_ to r4_ (note: r0_, r3_ | 5 // Initial input buffer layout, dividing into regions r0_ to r4_ (note: r0_, r3_ |
6 // and r4_ will move after the first load): | 6 // and r4_ will move after the first load): |
7 // | 7 // |
8 // |----------------|-----------------------------------------|----------------| | 8 // |----------------|-----------------------------------------|----------------| |
9 // | 9 // |
10 // request_frames_ | 10 // request_frames_ |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 // MSVC++ requires this to be set before any other includes to get M_PI. | 76 // MSVC++ requires this to be set before any other includes to get M_PI. |
77 #define _USE_MATH_DEFINES | 77 #define _USE_MATH_DEFINES |
78 | 78 |
79 #include "media/base/sinc_resampler.h" | 79 #include "media/base/sinc_resampler.h" |
80 | 80 |
81 #include <cmath> | 81 #include <cmath> |
82 #include <limits> | 82 #include <limits> |
83 | 83 |
84 #include "base/logging.h" | 84 #include "base/logging.h" |
| 85 #include "build/build_config.h" |
85 | 86 |
86 #if defined(ARCH_CPU_X86_FAMILY) | 87 #if defined(ARCH_CPU_X86_FAMILY) |
87 #include <xmmintrin.h> | 88 #include <xmmintrin.h> |
88 #define CONVOLVE_FUNC Convolve_SSE | 89 #define CONVOLVE_FUNC Convolve_SSE |
89 #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) | 90 #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) |
90 #include <arm_neon.h> | 91 #include <arm_neon.h> |
91 #define CONVOLVE_FUNC Convolve_NEON | 92 #define CONVOLVE_FUNC Convolve_NEON |
92 #else | 93 #else |
93 #define CONVOLVE_FUNC Convolve_C | 94 #define CONVOLVE_FUNC Convolve_C |
94 #endif | 95 #endif |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 vmulq_f32(m_sums1, vmovq_n_f32(1.0 - kernel_interpolation_factor)), | 405 vmulq_f32(m_sums1, vmovq_n_f32(1.0 - kernel_interpolation_factor)), |
405 m_sums2, vmovq_n_f32(kernel_interpolation_factor)); | 406 m_sums2, vmovq_n_f32(kernel_interpolation_factor)); |
406 | 407 |
407 // Sum components together. | 408 // Sum components together. |
408 float32x2_t m_half = vadd_f32(vget_high_f32(m_sums1), vget_low_f32(m_sums1)); | 409 float32x2_t m_half = vadd_f32(vget_high_f32(m_sums1), vget_low_f32(m_sums1)); |
409 return vget_lane_f32(vpadd_f32(m_half, m_half), 0); | 410 return vget_lane_f32(vpadd_f32(m_half, m_half), 0); |
410 } | 411 } |
411 #endif | 412 #endif |
412 | 413 |
413 } // namespace media | 414 } // namespace media |
OLD | NEW |