OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBlitRow_opts_arm_neon.h" | 8 #include "SkBlitRow_opts_arm_neon.h" |
9 | 9 |
10 #include "SkBlitMask.h" | 10 #include "SkBlitMask.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // duplicate in 4/2/1 & 8pix vsns | 239 // duplicate in 4/2/1 & 8pix vsns |
240 "vmvn.8 d30, d3 \n\t" | 240 "vmvn.8 d30, d3 \n\t" |
241 "vmlal.u8 q14, d30, d6 \n\t" | 241 "vmlal.u8 q14, d30, d6 \n\t" |
242 "vmlal.u8 q13, d30, d5 \n\t" | 242 "vmlal.u8 q13, d30, d5 \n\t" |
243 "vmlal.u8 q12, d30, d4 \n\t" | 243 "vmlal.u8 q12, d30, d4 \n\t" |
244 "vshr.u16 q8, q14, #5 \n\t" | 244 "vshr.u16 q8, q14, #5 \n\t" |
245 "vshr.u16 q9, q13, #6 \n\t" | 245 "vshr.u16 q9, q13, #6 \n\t" |
246 "vaddhn.u16 d6, q14, q8 \n\t" | 246 "vaddhn.u16 d6, q14, q8 \n\t" |
247 "vshr.u16 q8, q12, #5 \n\t" | 247 "vshr.u16 q8, q12, #5 \n\t" |
248 "vaddhn.u16 d5, q13, q9 \n\t" | 248 "vaddhn.u16 d5, q13, q9 \n\t" |
249 "vqadd.u8 d6, d6, d0 \n\t" // moved up | |
250 "vaddhn.u16 d4, q12, q8 \n\t" | 249 "vaddhn.u16 d4, q12, q8 \n\t" |
251 // intentionally don't calculate alpha | 250 // intentionally don't calculate alpha |
252 // result in d4-d6 | 251 // result in d4-d6 |
253 | 252 |
| 253 #ifdef SK_PMCOLOR_IS_RGBA |
| 254 "vqadd.u8 d6, d6, d0 \n\t" |
254 "vqadd.u8 d5, d5, d1 \n\t" | 255 "vqadd.u8 d5, d5, d1 \n\t" |
255 "vqadd.u8 d4, d4, d2 \n\t" | 256 "vqadd.u8 d4, d4, d2 \n\t" |
| 257 #else |
| 258 "vqadd.u8 d6, d6, d2 \n\t" |
| 259 "vqadd.u8 d5, d5, d1 \n\t" |
| 260 "vqadd.u8 d4, d4, d0 \n\t" |
| 261 #endif |
256 | 262 |
257 // pack 8888 {d4-d6} to 0565 q10 | 263 // pack 8888 {d4-d6} to 0565 q10 |
258 "vshll.u8 q10, d6, #8 \n\t" | 264 "vshll.u8 q10, d6, #8 \n\t" |
259 "vshll.u8 q3, d5, #8 \n\t" | 265 "vshll.u8 q3, d5, #8 \n\t" |
260 "vshll.u8 q2, d4, #8 \n\t" | 266 "vshll.u8 q2, d4, #8 \n\t" |
261 "vsri.u16 q10, q3, #5 \n\t" | 267 "vsri.u16 q10, q3, #5 \n\t" |
262 "vsri.u16 q10, q2, #11 \n\t" | 268 "vsri.u16 q10, q2, #11 \n\t" |
263 | 269 |
264 "bne 2b \n\t" | 270 "bne 2b \n\t" |
265 | 271 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // duplicate in 4/2/1 & 8pix vsns | 325 // duplicate in 4/2/1 & 8pix vsns |
320 "vmvn.8 d30, d3 \n\t" | 326 "vmvn.8 d30, d3 \n\t" |
321 "vmlal.u8 q14, d30, d6 \n\t" | 327 "vmlal.u8 q14, d30, d6 \n\t" |
322 "vmlal.u8 q13, d30, d5 \n\t" | 328 "vmlal.u8 q13, d30, d5 \n\t" |
323 "vmlal.u8 q12, d30, d4 \n\t" | 329 "vmlal.u8 q12, d30, d4 \n\t" |
324 "vshr.u16 q8, q14, #5 \n\t" | 330 "vshr.u16 q8, q14, #5 \n\t" |
325 "vshr.u16 q9, q13, #6 \n\t" | 331 "vshr.u16 q9, q13, #6 \n\t" |
326 "vaddhn.u16 d6, q14, q8 \n\t" | 332 "vaddhn.u16 d6, q14, q8 \n\t" |
327 "vshr.u16 q8, q12, #5 \n\t" | 333 "vshr.u16 q8, q12, #5 \n\t" |
328 "vaddhn.u16 d5, q13, q9 \n\t" | 334 "vaddhn.u16 d5, q13, q9 \n\t" |
329 "vqadd.u8 d6, d6, d0 \n\t" // moved up | |
330 "vaddhn.u16 d4, q12, q8 \n\t" | 335 "vaddhn.u16 d4, q12, q8 \n\t" |
331 // intentionally don't calculate alpha | 336 // intentionally don't calculate alpha |
332 // result in d4-d6 | 337 // result in d4-d6 |
333 | 338 |
| 339 #ifdef SK_PMCOLOR_IS_RGBA |
| 340 "vqadd.u8 d6, d6, d0 \n\t" |
334 "vqadd.u8 d5, d5, d1 \n\t" | 341 "vqadd.u8 d5, d5, d1 \n\t" |
335 "vqadd.u8 d4, d4, d2 \n\t" | 342 "vqadd.u8 d4, d4, d2 \n\t" |
| 343 #else |
| 344 "vqadd.u8 d6, d6, d2 \n\t" |
| 345 "vqadd.u8 d5, d5, d1 \n\t" |
| 346 "vqadd.u8 d4, d4, d0 \n\t" |
| 347 #endif |
336 | 348 |
337 // pack 8888 {d4-d6} to 0565 q10 | 349 // pack 8888 {d4-d6} to 0565 q10 |
338 "vshll.u8 q10, d6, #8 \n\t" | 350 "vshll.u8 q10, d6, #8 \n\t" |
339 "vshll.u8 q3, d5, #8 \n\t" | 351 "vshll.u8 q3, d5, #8 \n\t" |
340 "vshll.u8 q2, d4, #8 \n\t" | 352 "vshll.u8 q2, d4, #8 \n\t" |
341 "vsri.u16 q10, q3, #5 \n\t" | 353 "vsri.u16 q10, q3, #5 \n\t" |
342 "vsri.u16 q10, q2, #11 \n\t" | 354 "vsri.u16 q10, q2, #11 \n\t" |
343 | 355 |
344 // store | 356 // store |
345 "tst %[count], #4 \n\t" | 357 "tst %[count], #4 \n\t" |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 S32A_Opaque_BlitRow32_neon_src_alpha, // S32A_Opaque, | 1824 S32A_Opaque_BlitRow32_neon_src_alpha, // S32A_Opaque, |
1813 #else | 1825 #else |
1814 S32A_Opaque_BlitRow32_neon, // S32A_Opaque, | 1826 S32A_Opaque_BlitRow32_neon, // S32A_Opaque, |
1815 #endif | 1827 #endif |
1816 #ifdef SK_CPU_ARM32 | 1828 #ifdef SK_CPU_ARM32 |
1817 S32A_Blend_BlitRow32_neon // S32A_Blend | 1829 S32A_Blend_BlitRow32_neon // S32A_Blend |
1818 #else | 1830 #else |
1819 NULL | 1831 NULL |
1820 #endif | 1832 #endif |
1821 }; | 1833 }; |
OLD | NEW |