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