1 @****************************************************************************
2 @ i420_yuyv_neon.S : ARM NEONv1 I420 to YUYV chroma conversion
3 @*****************************************************************************
4 @ Copyright (C) 2009 RĂ©mi Denis-Courmont
6 @ This program is free software; you can redistribute it and/or modify
7 @ it under the terms of the GNU General Public License as published by
8 @ the Free Software Foundation; either version 2 of the License, or
9 @ (at your option) any later version.
11 @ This program is distributed in the hope that it will be useful,
12 @ but WITHOUT ANY WARRANTY; without even the implied warranty of
13 @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 @ GNU General Public License for more details.
16 @ You should have received a copy of the GNU General Public License
17 @ along with this program; if not, write to the Free Software
18 @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 @****************************************************************************/
35 .global i420_uyvy_neon
36 .type i420_uyvy_neon, %function
39 add r8, pc, #(indexes+64-.-8)
42 .global i420_yuyv_neon
43 .type i420_yuyv_neon, %function
46 add r8, pc, #(indexes-.-8)
47 .hidden i420_pack_neon
49 vld1.u8 {d24-d27}, [r8]!
50 ldmia r1, {r4, r6, r7}
51 vld1.u8 {d28-d31}, [r8]
52 add O2, O1, PITCH, lsl #1
57 vld1.u8 {d0-d1}, [Y1,:128]!
58 vld1.u8 {d2}, [U,:64]!
59 vld1.u8 {d3}, [V,:64]!
60 vld1.u8 {d4-d5}, [Y2,:128]!
61 vtbl.u8 d16, {d0-d3}, d24
62 vtbl.u8 d17, {d0-d3}, d25
63 vtbl.u8 d18, {d0-d3}, d26
64 vtbl.u8 d19, {d0-d3}, d27
65 vtbl.u8 d20, {d2-d5}, d28
66 vtbl.u8 d21, {d2-d5}, d29
67 vtbl.u8 d22, {d2-d5}, d30
68 vtbl.u8 d23, {d2-d5}, d31
69 vst1.u8 {d16-d19}, [O1,:128]!
70 vst1.u8 {d20-d23}, [O2,:128]!
90 .byte 0x00, 0x10, 0x01, 0x18, 0x02, 0x11, 0x03, 0x19
91 .byte 0x04, 0x12, 0x05, 0x1A, 0x06, 0x13, 0x07, 0x1B
92 .byte 0x08, 0x14, 0x09, 0x1C, 0x0A, 0x15, 0x0B, 0x1D
93 .byte 0x0C, 0x16, 0x0D, 0x1E, 0x0E, 0x17, 0x0F, 0x1F
95 .byte 0x10, 0x00, 0x11, 0x08, 0x12, 0x01, 0x13, 0x09
96 .byte 0x14, 0x02, 0x15, 0x0A, 0x16, 0x03, 0x17, 0x0B
97 .byte 0x18, 0x04, 0x19, 0x0C, 0x1A, 0x05, 0x1B, 0x0D
98 .byte 0x1C, 0x06, 0x1D, 0x0E, 0x1E, 0x07, 0x1F, 0x0F
100 .byte 0x10, 0x00, 0x18, 0x01, 0x11, 0x02, 0x19, 0x03
101 .byte 0x12, 0x04, 0x1A, 0x05, 0x13, 0x06, 0x1B, 0x07
102 .byte 0x14, 0x08, 0x1C, 0x09, 0x15, 0x0A, 0x1D, 0x0B
103 .byte 0x16, 0x0C, 0x1E, 0x0D, 0x17, 0x0E, 0x1F, 0x0F
105 .byte 0x00, 0x10, 0x08, 0x11, 0x01, 0x12, 0x09, 0x13
106 .byte 0x02, 0x14, 0x0A, 0x15, 0x03, 0x16, 0x0B, 0x17
107 .byte 0x04, 0x18, 0x0C, 0x19, 0x05, 0x1A, 0x0D, 0x1B
108 .byte 0x06, 0x1C, 0x0E, 0x1D, 0x07, 0x1E, 0x0F, 0x1F