1 @*****************************************************************************
2 @ i420_yuyv.S : ARM NEONv1 I420 to YUYV chroma conversion
3 @*****************************************************************************
4 @ Copyright (C) 2009-2011 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 Lesser General Public License as published by
8 @ the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
16 @ You should have received a copy of the GNU Lesser General Public License
17 @ along with this program; if not, write to the Free Software Foundation,
18 @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 @****************************************************************************/
24 #if HAVE_AS_FPU_DIRECTIVE
44 function i420_yuyv_neon
45 push {r4-r8,r10-r11,lr}
46 ldmia r0, {O1, OPITCH}
47 ldmia r1, {Y1, U, V, YPITCH}
49 sub OPAD, OPITCH, WIDTH, lsl #1
50 sub YPAD, YPITCH, WIDTH
57 pople {r4-r8,r10-r11,pc}
60 vld1.u8 {d2}, [U,:64]!
62 vld1.u8 {d3}, [V,:64]!
65 subs COUNT, COUNT, #16
66 vld1.u8 {q0}, [Y1,:128]!
70 vld1.u8 {q2}, [Y2,:128]!
72 vst1.u8 {q0-q1}, [O1,:128]!
73 vst1.u8 {q2-q3}, [O2,:128]!
79 add U, U, YPAD, lsr #1
80 add V, V, YPAD, lsr #1
83 function i420_uyvy_neon
84 push {r4-r8,r10-r11,lr}
85 ldmia r0, {O1, OPITCH}
86 ldmia r1, {Y1, U, V, YPITCH}
88 sub OPAD, OPITCH, WIDTH, lsl #1
89 sub YPAD, YPITCH, WIDTH
96 pople {r4-r8,r10-r11,pc}
99 vld1.u8 {d0}, [U,:64]!
101 vld1.u8 {d1}, [V,:64]!
104 subs COUNT, COUNT, #16
105 vld1.u8 {q1}, [Y1,:128]!
109 vld1.u8 {q3}, [Y2,:128]!
111 vst1.u8 {q0-q1}, [O1,:128]!
112 vst1.u8 {q2-q3}, [O2,:128]!
118 add U, U, YPAD, lsr #1
119 add V, V, YPAD, lsr #1