qt: playlist: use item title if available
[vlc.git] / modules / arm_neon / deinterleave_chroma.S
blob7c0723e2f6c1c5c16a18b4db4dbba43438b43358
1  @*****************************************************************************
2  @ deinterleave_chroma.S : ARM NEONv1 conversion of interleaved to planar chroma
3  @*****************************************************************************
4  @ Copyright (C) 2009-2011 Rémi Denis-Courmont
5  @ Copyright (C) 2013 Martin Storsjö
6  @
7  @ This program is free software; you can redistribute it and/or modify
8  @ it under the terms of the GNU Lesser General Public License as published by
9  @ the Free Software Foundation; either version 2.1 of the License, or
10  @ (at your option) any later version.
11  @
12  @ This program is distributed in the hope that it will be useful,
13  @ but WITHOUT ANY WARRANTY; without even the implied warranty of
14  @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  @ GNU Lesser General Public License for more details.
16  @
17  @ You should have received a copy of the GNU Lesser General Public License
18  @ along with this program; if not, write to the Free Software Foundation,
19  @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20  @****************************************************************************/
22 #include "asm.S"
24         .syntax unified
25 #if HAVE_AS_FPU_DIRECTIVE
26         .fpu    neon
27 #endif
28         .text
30 #define UV      r0
31 #define COUNT   r1
32 #define WIDTH   r2
33 #define HEIGHT  r3
34 #define IPITCH  r4
35 #define IPAD    r4
36 #define U       r5
37 #define V       r6
38 #define OPITCH  lr
39 #define OPAD    lr
41         .align 2
42 function deinterleave_chroma_neon
43         push            {r4-r6,lr}
44         ldmia           r0,     {U, V, OPITCH}
45         ldmia           r1,     {UV, IPITCH}
46         cmp             HEIGHT, #0
48         @ round the width up to a multiple of 8
49         add             WIDTH,  WIDTH, #7
50         bic             WIDTH,  WIDTH, #7
52         sub             IPAD,   IPITCH, WIDTH, lsl #1
53         sub             OPAD,   OPITCH, WIDTH
55         ite             gt
56         movsgt          COUNT,  WIDTH
57         pople           {r4-r6,pc}
59         pld             [UV, #64]
60         vld2.u8         {d0, d1},       [UV,:128]!
61         subs            COUNT,  COUNT,  #8
62         vst1.u8         {d0},           [U,:64]!
63         vst1.u8         {d1},           [V,:64]!
64         bgt             2b
66         subs            HEIGHT, #1
67         add             UV,     UV,     IPAD
68         add             U,      U,      OPAD
69         add             V,      V,      OPAD
70         b               1b