vpx_convolve8_neon_asm.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #include "./vpx_dsp_rtcd.h"
  11. #include "vp9/common/vp9_filter.h"
  12. #include "vpx_dsp/arm/vpx_convolve8_neon_asm.h"
  13. /* Type1 and Type2 functions are called depending on the position of the
  14. * negative and positive coefficients in the filter. In type1, the filter kernel
  15. * used is sub_pel_filters_8lp, in which only the first two and the last two
  16. * coefficients are negative. In type2, the negative coefficients are 0, 2, 5 &
  17. * 7.
  18. */
  19. #define DEFINE_FILTER(dir) \
  20. void vpx_convolve8_##dir##_neon( \
  21. const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \
  22. ptrdiff_t dst_stride, const InterpKernel *filter, int x0_q4, \
  23. int x_step_q4, int y0_q4, int y_step_q4, int w, int h) { \
  24. if (filter == vp9_filter_kernels[1]) { \
  25. vpx_convolve8_##dir##_filter_type1_neon( \
  26. src, src_stride, dst, dst_stride, filter, x0_q4, x_step_q4, y0_q4, \
  27. y_step_q4, w, h); \
  28. } else { \
  29. vpx_convolve8_##dir##_filter_type2_neon( \
  30. src, src_stride, dst, dst_stride, filter, x0_q4, x_step_q4, y0_q4, \
  31. y_step_q4, w, h); \
  32. } \
  33. }
  34. DEFINE_FILTER(horiz);
  35. DEFINE_FILTER(avg_horiz);
  36. DEFINE_FILTER(vert);
  37. DEFINE_FILTER(avg_vert);