2 ; Copyright (c) 2013 The WebM project authors. All Rights Reserved.
4 ; Use of this source code is governed by a BSD-style license and patent
5 ; grant that can be found in the LICENSE file in the root of the source
6 ; tree. All contributing project authors may be found in the AUTHORS
7 ; file in the root of the source tree.
11 EXPORT |vp9_idct4x4_1_add_neon|
16 AREA ||.text||, CODE, READONLY, ALIGN=2
18 ;void vp9_idct4x4_1_add_neon(int16_t *input, uint8_t *dest,
25 |vp9_idct4x4_1_add_neon| PROC
28 ; generate cospi_16_64 = 11585
32 ; out = dct_const_round_shift(input[0] * cospi_16_64)
33 mul r0, r0, r12 ; input[0] * cospi_16_64
34 add r0, r0, #0x2000 ; +(1 << ((DCT_CONST_BITS) - 1))
35 asr r0, r0, #14 ; >> DCT_CONST_BITS
37 ; out = dct_const_round_shift(out * cospi_16_64)
38 mul r0, r0, r12 ; out * cospi_16_64
39 mov r12, r1 ; save dest
40 add r0, r0, #0x2000 ; +(1 << ((DCT_CONST_BITS) - 1))
41 asr r0, r0, #14 ; >> DCT_CONST_BITS
43 ; a1 = ROUND_POWER_OF_TWO(out, 4)
44 add r0, r0, #8 ; + (1 <<((4) - 1))
47 vdup.s16 q0, r0 ; duplicate a1
49 vld1.32 {d2[0]}, [r1], r2
50 vld1.32 {d2[1]}, [r1], r2
51 vld1.32 {d4[0]}, [r1], r2
54 vaddw.u8 q8, q0, d2 ; dest[x] + a1
57 vqmovun.s16 d6, q8 ; clip_pixel
60 vst1.32 {d6[0]}, [r12], r2
61 vst1.32 {d6[1]}, [r12], r2
62 vst1.32 {d7[0]}, [r12], r2
63 vst1.32 {d7[1]}, [r12]
66 ENDP ; |vp9_idct4x4_1_add_neon|