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.
10 EXPORT |vp9_idct32x32_1_add_neon|
15 AREA ||.text||, CODE, READONLY, ALIGN=2
17 ;TODO(hkuang): put the following macros in a seperate
18 ;file so other idct function could also use them.
21 vld1.8 {q8}, [$src], $stride
22 vld1.8 {q9}, [$src], $stride
23 vld1.8 {q10}, [$src], $stride
24 vld1.8 {q11}, [$src], $stride
25 vld1.8 {q12}, [$src], $stride
26 vld1.8 {q13}, [$src], $stride
27 vld1.8 {q14}, [$src], $stride
28 vld1.8 {q15}, [$src], $stride
33 vqadd.u8 q8, q8, $diff
34 vqadd.u8 q9, q9, $diff
35 vqadd.u8 q10, q10, $diff
36 vqadd.u8 q11, q11, $diff
37 vqadd.u8 q12, q12, $diff
38 vqadd.u8 q13, q13, $diff
39 vqadd.u8 q14, q14, $diff
40 vqadd.u8 q15, q15, $diff
45 vqsub.u8 q8, q8, $diff
46 vqsub.u8 q9, q9, $diff
47 vqsub.u8 q10, q10, $diff
48 vqsub.u8 q11, q11, $diff
49 vqsub.u8 q12, q12, $diff
50 vqsub.u8 q13, q13, $diff
51 vqsub.u8 q14, q14, $diff
52 vqsub.u8 q15, q15, $diff
57 vst1.8 {q8}, [$dst], $stride
58 vst1.8 {q9}, [$dst], $stride
59 vst1.8 {q10},[$dst], $stride
60 vst1.8 {q11},[$dst], $stride
61 vst1.8 {q12},[$dst], $stride
62 vst1.8 {q13},[$dst], $stride
63 vst1.8 {q14},[$dst], $stride
64 vst1.8 {q15},[$dst], $stride
67 ;void vp9_idct32x32_1_add_neon(int16_t *input, uint8_t *dest,
74 |vp9_idct32x32_1_add_neon| PROC
77 add r3, r1, #16 ; r3 dest + 16 for second loop
80 ; generate cospi_16_64 = 11585
84 ; out = dct_const_round_shift(input[0] * cospi_16_64)
85 mul r0, r0, r12 ; input[0] * cospi_16_64
86 add r0, r0, #0x2000 ; +(1 << ((DCT_CONST_BITS) - 1))
87 asr r0, r0, #14 ; >> DCT_CONST_BITS
89 ; out = dct_const_round_shift(out * cospi_16_64)
90 mul r0, r0, r12 ; out * cospi_16_64
91 mov r12, r1 ; save dest
92 add r0, r0, #0x2000 ; +(1 << ((DCT_CONST_BITS) - 1))
93 asr r0, r0, #14 ; >> DCT_CONST_BITS
95 ; a1 = ROUND_POWER_OF_TWO(out, 6)
96 add r0, r0, #32 ; + (1 <<((6) - 1))
97 asrs r0, r0, #6 ; >> 6
98 bge diff_positive_32_32
106 diff_negative_32_32_loop
119 bne diff_negative_32_32_loop
127 diff_positive_32_32_loop
140 bne diff_positive_32_32_loop
143 ENDP ; |vp9_idct32x32_1_add_neon|