1 /* 2 * Copyright (c) 2018 The WebM project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include "./vpx_dsp_rtcd.h" 12 #include "vp9/common/vp9_filter.h" 13 #include "vpx_dsp/arm/vpx_convolve8_neon_asm.h" 14 15 /* Type1 and Type2 functions are called depending on the position of the 16 * negative and positive coefficients in the filter. In type1, the filter kernel 17 * used is sub_pel_filters_8lp, in which only the first two and the last two 18 * coefficients are negative. In type2, the negative coefficients are 0, 2, 5 & 19 * 7. 20 */ 21 22 #define DEFINE_FILTER(dir) \ 23 void vpx_convolve8_##dir##_neon( \ 24 const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ 25 ptrdiff_t dst_stride, const InterpKernel *filter, int x0_q4, \ 26 int x_step_q4, int y0_q4, int y_step_q4, int w, int h) { \ 27 if (filter == vp9_filter_kernels[1]) { \ 28 vpx_convolve8_##dir##_filter_type1_neon( \ 29 src, src_stride, dst, dst_stride, filter, x0_q4, x_step_q4, y0_q4, \ 30 y_step_q4, w, h); \ 31 } else { \ 32 vpx_convolve8_##dir##_filter_type2_neon( \ 33 src, src_stride, dst, dst_stride, filter, x0_q4, x_step_q4, y0_q4, \ 34 y_step_q4, w, h); \ 35 } \ 36 } 37 38 DEFINE_FILTER(horiz); 39 DEFINE_FILTER(avg_horiz); 40 DEFINE_FILTER(vert); 41 DEFINE_FILTER(avg_vert); 42