]> git.sesse.net Git - vlc/blob - modules/arm_neon/chroma_neon.h
Contribs: fix xml2 installation on OSX
[vlc] / modules / arm_neon / chroma_neon.h
1 /*****************************************************************************
2  * chroma_neon.h
3  *****************************************************************************
4  * Copyright (C) 2011 RĂ©mi Denis-Courmont
5  *
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.
10  *
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.
15  *
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  *****************************************************************************/
20
21 /* Planes must start on a 16-bytes boundary. Pitches must be multiples of 16
22  * bytes even for subsampled components. */
23
24 /* Planar picture buffer.
25  * Pitch corresponds to luminance component in bytes. Chrominance pitches are
26  * inferred from the color subsampling ratio. */
27 struct yuv_planes
28 {
29         void *y, *u, *v;
30         size_t pitch;
31 };
32
33 /* Packed picture buffer. Pitch is in bytes (_not_ pixels). */
34 struct yuv_pack
35 {
36         void *yuv;
37         size_t pitch;
38 };
39
40 /* I420 to YUYV conversion. */
41 void i420_yuyv_neon (struct yuv_pack *const out,
42                      const struct yuv_planes *const in,
43                      int width, int height);
44
45 /* I420 to UYVY conversion. */
46 void i420_uyvy_neon (struct yuv_pack *const out,
47                      const struct yuv_planes *const in,
48                      int width, int height);
49
50 /* I422 to YUYV conversion. */
51 void i422_yuyv_neon (struct yuv_pack *const out,
52                      const struct yuv_planes *const in,
53                      int width, int height);
54
55 /* I422 to UYVY conversion. */
56 void i422_uyvy_neon (struct yuv_pack *const out,
57                      const struct yuv_planes *const in,
58                      int width, int height);
59
60 /* YUYV to I422 conversion. */
61 void yuyv_i422_neon (struct yuv_planes *const out,
62                      const struct yuv_pack *const in, int width, int height);
63
64 /* UYVY to I422 conversion. */
65 void uyvy_i422_neon (struct yuv_planes *const out,
66                      const struct yuv_pack *const in, int width, int height);