copymem_neon.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2014 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 <arm_neon.h>
  11. #include "./vp8_rtcd.h"
  12. void vp8_copy_mem8x4_neon(unsigned char *src, int src_stride,
  13. unsigned char *dst, int dst_stride) {
  14. uint8x8_t vtmp;
  15. int r;
  16. for (r = 0; r < 4; ++r) {
  17. vtmp = vld1_u8(src);
  18. vst1_u8(dst, vtmp);
  19. src += src_stride;
  20. dst += dst_stride;
  21. }
  22. }
  23. void vp8_copy_mem8x8_neon(unsigned char *src, int src_stride,
  24. unsigned char *dst, int dst_stride) {
  25. uint8x8_t vtmp;
  26. int r;
  27. for (r = 0; r < 8; ++r) {
  28. vtmp = vld1_u8(src);
  29. vst1_u8(dst, vtmp);
  30. src += src_stride;
  31. dst += dst_stride;
  32. }
  33. }
  34. void vp8_copy_mem16x16_neon(unsigned char *src, int src_stride,
  35. unsigned char *dst, int dst_stride) {
  36. int r;
  37. uint8x16_t qtmp;
  38. for (r = 0; r < 16; ++r) {
  39. qtmp = vld1q_u8(src);
  40. vst1q_u8(dst, qtmp);
  41. src += src_stride;
  42. dst += dst_stride;
  43. }
  44. }