Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: source/libvpx/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.asm

Issue 812033011: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 ;
2 ; Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3 ;
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.
8 ;
9
10
11 EXPORT |vp9_idct16x16_1_add_neon|
12 ARM
13 REQUIRE8
14 PRESERVE8
15
16 AREA ||.text||, CODE, READONLY, ALIGN=2
17
18 ;void vp9_idct16x16_1_add_neon(int16_t *input, uint8_t *dest,
19 ; int dest_stride)
20 ;
21 ; r0 int16_t input
22 ; r1 uint8_t *dest
23 ; r2 int dest_stride)
24
25 |vp9_idct16x16_1_add_neon| PROC
26 ldrsh r0, [r0]
27
28 ; generate cospi_16_64 = 11585
29 mov r12, #0x2d00
30 add r12, #0x41
31
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
36
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
42
43 ; a1 = ROUND_POWER_OF_TWO(out, 6)
44 add r0, r0, #32 ; + (1 <<((6) - 1))
45 asr r0, r0, #6 ; >> 6
46
47 vdup.s16 q0, r0 ; duplicate a1
48 mov r0, #8
49 sub r2, #8
50
51 ; load destination data row0 - row3
52 vld1.64 {d2}, [r1], r0
53 vld1.64 {d3}, [r1], r2
54 vld1.64 {d4}, [r1], r0
55 vld1.64 {d5}, [r1], r2
56 vld1.64 {d6}, [r1], r0
57 vld1.64 {d7}, [r1], r2
58 vld1.64 {d16}, [r1], r0
59 vld1.64 {d17}, [r1], r2
60
61 vaddw.u8 q9, q0, d2 ; dest[x] + a1
62 vaddw.u8 q10, q0, d3 ; dest[x] + a1
63 vaddw.u8 q11, q0, d4 ; dest[x] + a1
64 vaddw.u8 q12, q0, d5 ; dest[x] + a1
65 vqmovun.s16 d2, q9 ; clip_pixel
66 vqmovun.s16 d3, q10 ; clip_pixel
67 vqmovun.s16 d30, q11 ; clip_pixel
68 vqmovun.s16 d31, q12 ; clip_pixel
69 vst1.64 {d2}, [r12], r0
70 vst1.64 {d3}, [r12], r2
71 vst1.64 {d30}, [r12], r0
72 vst1.64 {d31}, [r12], r2
73
74 vaddw.u8 q9, q0, d6 ; dest[x] + a1
75 vaddw.u8 q10, q0, d7 ; dest[x] + a1
76 vaddw.u8 q11, q0, d16 ; dest[x] + a1
77 vaddw.u8 q12, q0, d17 ; dest[x] + a1
78 vqmovun.s16 d2, q9 ; clip_pixel
79 vqmovun.s16 d3, q10 ; clip_pixel
80 vqmovun.s16 d30, q11 ; clip_pixel
81 vqmovun.s16 d31, q12 ; clip_pixel
82 vst1.64 {d2}, [r12], r0
83 vst1.64 {d3}, [r12], r2
84 vst1.64 {d30}, [r12], r0
85 vst1.64 {d31}, [r12], r2
86
87 ; load destination data row4 - row7
88 vld1.64 {d2}, [r1], r0
89 vld1.64 {d3}, [r1], r2
90 vld1.64 {d4}, [r1], r0
91 vld1.64 {d5}, [r1], r2
92 vld1.64 {d6}, [r1], r0
93 vld1.64 {d7}, [r1], r2
94 vld1.64 {d16}, [r1], r0
95 vld1.64 {d17}, [r1], r2
96
97 vaddw.u8 q9, q0, d2 ; dest[x] + a1
98 vaddw.u8 q10, q0, d3 ; dest[x] + a1
99 vaddw.u8 q11, q0, d4 ; dest[x] + a1
100 vaddw.u8 q12, q0, d5 ; dest[x] + a1
101 vqmovun.s16 d2, q9 ; clip_pixel
102 vqmovun.s16 d3, q10 ; clip_pixel
103 vqmovun.s16 d30, q11 ; clip_pixel
104 vqmovun.s16 d31, q12 ; clip_pixel
105 vst1.64 {d2}, [r12], r0
106 vst1.64 {d3}, [r12], r2
107 vst1.64 {d30}, [r12], r0
108 vst1.64 {d31}, [r12], r2
109
110 vaddw.u8 q9, q0, d6 ; dest[x] + a1
111 vaddw.u8 q10, q0, d7 ; dest[x] + a1
112 vaddw.u8 q11, q0, d16 ; dest[x] + a1
113 vaddw.u8 q12, q0, d17 ; dest[x] + a1
114 vqmovun.s16 d2, q9 ; clip_pixel
115 vqmovun.s16 d3, q10 ; clip_pixel
116 vqmovun.s16 d30, q11 ; clip_pixel
117 vqmovun.s16 d31, q12 ; clip_pixel
118 vst1.64 {d2}, [r12], r0
119 vst1.64 {d3}, [r12], r2
120 vst1.64 {d30}, [r12], r0
121 vst1.64 {d31}, [r12], r2
122
123 ; load destination data row8 - row11
124 vld1.64 {d2}, [r1], r0
125 vld1.64 {d3}, [r1], r2
126 vld1.64 {d4}, [r1], r0
127 vld1.64 {d5}, [r1], r2
128 vld1.64 {d6}, [r1], r0
129 vld1.64 {d7}, [r1], r2
130 vld1.64 {d16}, [r1], r0
131 vld1.64 {d17}, [r1], r2
132
133 vaddw.u8 q9, q0, d2 ; dest[x] + a1
134 vaddw.u8 q10, q0, d3 ; dest[x] + a1
135 vaddw.u8 q11, q0, d4 ; dest[x] + a1
136 vaddw.u8 q12, q0, d5 ; dest[x] + a1
137 vqmovun.s16 d2, q9 ; clip_pixel
138 vqmovun.s16 d3, q10 ; clip_pixel
139 vqmovun.s16 d30, q11 ; clip_pixel
140 vqmovun.s16 d31, q12 ; clip_pixel
141 vst1.64 {d2}, [r12], r0
142 vst1.64 {d3}, [r12], r2
143 vst1.64 {d30}, [r12], r0
144 vst1.64 {d31}, [r12], r2
145
146 vaddw.u8 q9, q0, d6 ; dest[x] + a1
147 vaddw.u8 q10, q0, d7 ; dest[x] + a1
148 vaddw.u8 q11, q0, d16 ; dest[x] + a1
149 vaddw.u8 q12, q0, d17 ; dest[x] + a1
150 vqmovun.s16 d2, q9 ; clip_pixel
151 vqmovun.s16 d3, q10 ; clip_pixel
152 vqmovun.s16 d30, q11 ; clip_pixel
153 vqmovun.s16 d31, q12 ; clip_pixel
154 vst1.64 {d2}, [r12], r0
155 vst1.64 {d3}, [r12], r2
156 vst1.64 {d30}, [r12], r0
157 vst1.64 {d31}, [r12], r2
158
159 ; load destination data row12 - row15
160 vld1.64 {d2}, [r1], r0
161 vld1.64 {d3}, [r1], r2
162 vld1.64 {d4}, [r1], r0
163 vld1.64 {d5}, [r1], r2
164 vld1.64 {d6}, [r1], r0
165 vld1.64 {d7}, [r1], r2
166 vld1.64 {d16}, [r1], r0
167 vld1.64 {d17}, [r1], r2
168
169 vaddw.u8 q9, q0, d2 ; dest[x] + a1
170 vaddw.u8 q10, q0, d3 ; dest[x] + a1
171 vaddw.u8 q11, q0, d4 ; dest[x] + a1
172 vaddw.u8 q12, q0, d5 ; dest[x] + a1
173 vqmovun.s16 d2, q9 ; clip_pixel
174 vqmovun.s16 d3, q10 ; clip_pixel
175 vqmovun.s16 d30, q11 ; clip_pixel
176 vqmovun.s16 d31, q12 ; clip_pixel
177 vst1.64 {d2}, [r12], r0
178 vst1.64 {d3}, [r12], r2
179 vst1.64 {d30}, [r12], r0
180 vst1.64 {d31}, [r12], r2
181
182 vaddw.u8 q9, q0, d6 ; dest[x] + a1
183 vaddw.u8 q10, q0, d7 ; dest[x] + a1
184 vaddw.u8 q11, q0, d16 ; dest[x] + a1
185 vaddw.u8 q12, q0, d17 ; dest[x] + a1
186 vqmovun.s16 d2, q9 ; clip_pixel
187 vqmovun.s16 d3, q10 ; clip_pixel
188 vqmovun.s16 d30, q11 ; clip_pixel
189 vqmovun.s16 d31, q12 ; clip_pixel
190 vst1.64 {d2}, [r12], r0
191 vst1.64 {d3}, [r12], r2
192 vst1.64 {d30}, [r12], r0
193 vst1.64 {d31}, [r12], r2
194
195 bx lr
196 ENDP ; |vp9_idct16x16_1_add_neon|
197
198 END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698