• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
11 #include <arm_neon.h>
12 
vp8_copy_mem8x4_neon(unsigned char * src,int src_stride,unsigned char * dst,int dst_stride)13 void vp8_copy_mem8x4_neon(unsigned char *src, int src_stride,
14                           unsigned char *dst, int dst_stride) {
15   uint8x8_t vtmp;
16   int r;
17 
18   for (r = 0; r < 4; ++r) {
19     vtmp = vld1_u8(src);
20     vst1_u8(dst, vtmp);
21     src += src_stride;
22     dst += dst_stride;
23   }
24 }
25 
vp8_copy_mem8x8_neon(unsigned char * src,int src_stride,unsigned char * dst,int dst_stride)26 void vp8_copy_mem8x8_neon(unsigned char *src, int src_stride,
27                           unsigned char *dst, int dst_stride) {
28   uint8x8_t vtmp;
29   int r;
30 
31   for (r = 0; r < 8; ++r) {
32     vtmp = vld1_u8(src);
33     vst1_u8(dst, vtmp);
34     src += src_stride;
35     dst += dst_stride;
36   }
37 }
38 
vp8_copy_mem16x16_neon(unsigned char * src,int src_stride,unsigned char * dst,int dst_stride)39 void vp8_copy_mem16x16_neon(unsigned char *src, int src_stride,
40                             unsigned char *dst, int dst_stride) {
41   int r;
42   uint8x16_t qtmp;
43 
44   for (r = 0; r < 16; ++r) {
45     qtmp = vld1q_u8(src);
46     vst1q_u8(dst, qtmp);
47     src += src_stride;
48     dst += dst_stride;
49   }
50 }
51