Home | History | Annotate | Download | only in neon
      1 ;
      2 ;  Copyright (c) 2010 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 
     12     EXPORT  |vp8_recon2b_neon|
     13     ARM
     14     REQUIRE8
     15     PRESERVE8
     16 
     17     AREA ||.text||, CODE, READONLY, ALIGN=2
     18 
     19 ; r0    unsigned char  *pred_ptr,
     20 ; r1    short *diff_ptr,
     21 ; r2    unsigned char *dst_ptr,
     22 ; r3    int stride
     23 
     24 |vp8_recon2b_neon| PROC
     25     vld1.u8         {q8, q9}, [r0]      ;load data from pred_ptr
     26     vld1.16         {q4, q5}, [r1]!     ;load data from diff_ptr
     27 
     28     vmovl.u8        q0, d16             ;modify Pred data from 8 bits to 16 bits
     29     vld1.16         {q6, q7}, [r1]!
     30     vmovl.u8        q1, d17
     31     vmovl.u8        q2, d18
     32     vmovl.u8        q3, d19
     33 
     34     vadd.s16        q0, q0, q4          ;add Diff data and Pred data together
     35     vadd.s16        q1, q1, q5
     36     vadd.s16        q2, q2, q6
     37     vadd.s16        q3, q3, q7
     38 
     39     vqmovun.s16     d0, q0              ;CLAMP() saturation
     40     vqmovun.s16     d1, q1
     41     vqmovun.s16     d2, q2
     42     vqmovun.s16     d3, q3
     43     add             r0, r2, r3
     44 
     45     vst1.u8         {d0}, [r2]          ;store result
     46     vst1.u8         {d1}, [r0], r3
     47     add             r2, r0, r3
     48     vst1.u8         {d2}, [r0]
     49     vst1.u8         {d3}, [r2], r3
     50 
     51     bx             lr
     52 
     53     ENDP
     54     END
     55