My Project
mmal_encodings.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the copyright holder nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef MMAL_ENCODINGS_H
29 #define MMAL_ENCODINGS_H
30 
31 #include "mmal_common.h"
32 
37 /* @{ */
38 
40 /* @{ */
41 #define MMAL_ENCODING_H264 MMAL_FOURCC('H','2','6','4')
42 #define MMAL_ENCODING_MVC MMAL_FOURCC('M','V','C',' ')
43 #define MMAL_ENCODING_H263 MMAL_FOURCC('H','2','6','3')
44 #define MMAL_ENCODING_MP4V MMAL_FOURCC('M','P','4','V')
45 #define MMAL_ENCODING_MP2V MMAL_FOURCC('M','P','2','V')
46 #define MMAL_ENCODING_MP1V MMAL_FOURCC('M','P','1','V')
47 #define MMAL_ENCODING_WMV3 MMAL_FOURCC('W','M','V','3')
48 #define MMAL_ENCODING_WMV2 MMAL_FOURCC('W','M','V','2')
49 #define MMAL_ENCODING_WMV1 MMAL_FOURCC('W','M','V','1')
50 #define MMAL_ENCODING_WVC1 MMAL_FOURCC('W','V','C','1')
51 #define MMAL_ENCODING_VP8 MMAL_FOURCC('V','P','8',' ')
52 #define MMAL_ENCODING_VP7 MMAL_FOURCC('V','P','7',' ')
53 #define MMAL_ENCODING_VP6 MMAL_FOURCC('V','P','6',' ')
54 #define MMAL_ENCODING_THEORA MMAL_FOURCC('T','H','E','O')
55 #define MMAL_ENCODING_SPARK MMAL_FOURCC('S','P','R','K')
56 #define MMAL_ENCODING_MJPEG MMAL_FOURCC('M','J','P','G')
57 
58 #define MMAL_ENCODING_JPEG MMAL_FOURCC('J','P','E','G')
59 #define MMAL_ENCODING_GIF MMAL_FOURCC('G','I','F',' ')
60 #define MMAL_ENCODING_PNG MMAL_FOURCC('P','N','G',' ')
61 #define MMAL_ENCODING_PPM MMAL_FOURCC('P','P','M',' ')
62 #define MMAL_ENCODING_TGA MMAL_FOURCC('T','G','A',' ')
63 #define MMAL_ENCODING_BMP MMAL_FOURCC('B','M','P',' ')
64 
65 #define MMAL_ENCODING_I420 MMAL_FOURCC('I','4','2','0')
66 #define MMAL_ENCODING_I420_SLICE MMAL_FOURCC('S','4','2','0')
67 #define MMAL_ENCODING_YV12 MMAL_FOURCC('Y','V','1','2')
68 #define MMAL_ENCODING_I422 MMAL_FOURCC('I','4','2','2')
69 #define MMAL_ENCODING_I422_SLICE MMAL_FOURCC('S','4','2','2')
70 #define MMAL_ENCODING_YUYV MMAL_FOURCC('Y','U','Y','V')
71 #define MMAL_ENCODING_YVYU MMAL_FOURCC('Y','V','Y','U')
72 #define MMAL_ENCODING_UYVY MMAL_FOURCC('U','Y','V','Y')
73 #define MMAL_ENCODING_VYUY MMAL_FOURCC('V','Y','U','Y')
74 #define MMAL_ENCODING_NV12 MMAL_FOURCC('N','V','1','2')
75 #define MMAL_ENCODING_NV21 MMAL_FOURCC('N','V','2','1')
76 #define MMAL_ENCODING_ARGB MMAL_FOURCC('A','R','G','B')
77 #define MMAL_ENCODING_ARGB_SLICE MMAL_FOURCC('a','r','g','b')
78 #define MMAL_ENCODING_RGBA MMAL_FOURCC('R','G','B','A')
79 #define MMAL_ENCODING_RGBA_SLICE MMAL_FOURCC('r','g','b','a')
80 #define MMAL_ENCODING_ABGR MMAL_FOURCC('A','B','G','R')
81 #define MMAL_ENCODING_ABGR_SLICE MMAL_FOURCC('a','b','g','r')
82 #define MMAL_ENCODING_BGRA MMAL_FOURCC('B','G','R','A')
83 #define MMAL_ENCODING_BGRA_SLICE MMAL_FOURCC('b','g','r','a')
84 #define MMAL_ENCODING_RGB16 MMAL_FOURCC('R','G','B','2')
85 #define MMAL_ENCODING_RGB16_SLICE MMAL_FOURCC('r','g','b','2')
86 #define MMAL_ENCODING_RGB24 MMAL_FOURCC('R','G','B','3')
87 #define MMAL_ENCODING_RGB24_SLICE MMAL_FOURCC('r','g','b','3')
88 #define MMAL_ENCODING_RGB32 MMAL_FOURCC('R','G','B','4')
89 #define MMAL_ENCODING_RGB32_SLICE MMAL_FOURCC('r','g','b','4')
90 #define MMAL_ENCODING_BGR16 MMAL_FOURCC('B','G','R','2')
91 #define MMAL_ENCODING_BGR16_SLICE MMAL_FOURCC('b','g','r','2')
92 #define MMAL_ENCODING_BGR24 MMAL_FOURCC('B','G','R','3')
93 #define MMAL_ENCODING_BGR24_SLICE MMAL_FOURCC('b','g','r','3')
94 #define MMAL_ENCODING_BGR32 MMAL_FOURCC('B','G','R','4')
95 #define MMAL_ENCODING_BGR32_SLICE MMAL_FOURCC('b','g','r','4')
96 
99 #define MMAL_ENCODING_I420_16 MMAL_FOURCC('i','4','2','0')
100 
102 #define MMAL_ENCODING_I420_10 MMAL_FOURCC('i','4','1','0')
103 
107 #define MMAL_ENCODING_I420_S MMAL_FOURCC('I','4','2','S')
108 
109 //Bayer formats
110 //FourCC values copied from V4L2 where defined.
111 //10 bit per pixel packed Bayer formats.
112 #define MMAL_ENCODING_BAYER_SBGGR10P MMAL_FOURCC('p','B','A','A') //BGGR
113 #define MMAL_ENCODING_BAYER_SGRBG10P MMAL_FOURCC('p','g','A','A') //GRBG
114 #define MMAL_ENCODING_BAYER_SGBRG10P MMAL_FOURCC('p','G','A','A') //GBRG
115 #define MMAL_ENCODING_BAYER_SRGGB10P MMAL_FOURCC('p','R','A','A') //RGGB
116 
117 //8 bit per pixel Bayer formats.
118 #define MMAL_ENCODING_BAYER_SBGGR8 MMAL_FOURCC('B','A','8','1') //BGGR
119 #define MMAL_ENCODING_BAYER_SGBRG8 MMAL_FOURCC('G','B','R','G') //GBRG
120 #define MMAL_ENCODING_BAYER_SGRBG8 MMAL_FOURCC('G','R','B','G') //GRBG
121 #define MMAL_ENCODING_BAYER_SRGGB8 MMAL_FOURCC('R','G','G','B') //RGGB
122 
123 //12 bit per pixel Bayer formats - not defined in V4L2, only 12bit expanded to 16.
124 //Copy 10bpp packed 4CC pattern
125 #define MMAL_ENCODING_BAYER_SBGGR12P MMAL_FOURCC('p','B','1','2') //BGGR
126 #define MMAL_ENCODING_BAYER_SGRBG12P MMAL_FOURCC('p','g','1','2') //GRBG
127 #define MMAL_ENCODING_BAYER_SGBRG12P MMAL_FOURCC('p','G','1','2') //GBRG
128 #define MMAL_ENCODING_BAYER_SRGGB12P MMAL_FOURCC('p','R','1','2') //RGGB
129 
130 //16 bit per pixel Bayer formats.
131 #define MMAL_ENCODING_BAYER_SBGGR16 MMAL_FOURCC('B','G','1','6') //BGGR
132 #define MMAL_ENCODING_BAYER_SGBRG16 MMAL_FOURCC('G','B','1','6') //GBRG
133 #define MMAL_ENCODING_BAYER_SGRBG16 MMAL_FOURCC('G','R','1','6') //GRBG
134 #define MMAL_ENCODING_BAYER_SRGGB16 MMAL_FOURCC('R','G','1','6') //RGGB
135 
136 //10 bit per pixel DPCM compressed to 8bits Bayer formats.
137 #define MMAL_ENCODING_BAYER_SBGGR10DPCM8 MMAL_FOURCC('b','B','A','8') //BGGR
138 #define MMAL_ENCODING_BAYER_SGBRG10DPCM8 MMAL_FOURCC('b','G','A','8') //GBRG
139 #define MMAL_ENCODING_BAYER_SGRBG10DPCM8 MMAL_FOURCC('B','D','1','0') //GRBG
140 #define MMAL_ENCODING_BAYER_SRGGB10DPCM8 MMAL_FOURCC('b','R','A','8') //RGGB
141 
146 #define MMAL_ENCODING_YUVUV128 MMAL_FOURCC('S','A','N','D')
147 
151 #define MMAL_ENCODING_YUVUV64_16 MMAL_FOURCC('S','A','1','6')
152 
154 #define MMAL_ENCODING_YUVUV64_10 MMAL_FOURCC('S','A','1','0')
155 
159 #define MMAL_ENCODING_OPAQUE MMAL_FOURCC('O','P','Q','V')
160 
163 #define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E','G','L','I')
164 
165 /* }@ */
166 
168 /* @{ */
169 #define MMAL_ENCODING_PCM_UNSIGNED_BE MMAL_FOURCC('P','C','M','U')
170 #define MMAL_ENCODING_PCM_UNSIGNED_LE MMAL_FOURCC('p','c','m','u')
171 #define MMAL_ENCODING_PCM_SIGNED_BE MMAL_FOURCC('P','C','M','S')
172 #define MMAL_ENCODING_PCM_SIGNED_LE MMAL_FOURCC('p','c','m','s')
173 #define MMAL_ENCODING_PCM_FLOAT_BE MMAL_FOURCC('P','C','M','F')
174 #define MMAL_ENCODING_PCM_FLOAT_LE MMAL_FOURCC('p','c','m','f')
175 /* Defines for native endianness */
176 #ifdef MMAL_IS_BIG_ENDIAN
177 #define MMAL_ENCODING_PCM_UNSIGNED MMAL_ENCODING_PCM_UNSIGNED_BE
178 #define MMAL_ENCODING_PCM_SIGNED MMAL_ENCODING_PCM_SIGNED_BE
179 #define MMAL_ENCODING_PCM_FLOAT MMAL_ENCODING_PCM_FLOAT_BE
180 #else
181 #define MMAL_ENCODING_PCM_UNSIGNED MMAL_ENCODING_PCM_UNSIGNED_LE
182 #define MMAL_ENCODING_PCM_SIGNED MMAL_ENCODING_PCM_SIGNED_LE
183 #define MMAL_ENCODING_PCM_FLOAT MMAL_ENCODING_PCM_FLOAT_LE
184 #endif
185 
186 #define MMAL_ENCODING_MP4A MMAL_FOURCC('M','P','4','A')
187 #define MMAL_ENCODING_MPGA MMAL_FOURCC('M','P','G','A')
188 #define MMAL_ENCODING_ALAW MMAL_FOURCC('A','L','A','W')
189 #define MMAL_ENCODING_MULAW MMAL_FOURCC('U','L','A','W')
190 #define MMAL_ENCODING_ADPCM_MS MMAL_FOURCC('M','S',0x0,0x2)
191 #define MMAL_ENCODING_ADPCM_IMA_MS MMAL_FOURCC('M','S',0x0,0x1)
192 #define MMAL_ENCODING_ADPCM_SWF MMAL_FOURCC('A','S','W','F')
193 #define MMAL_ENCODING_WMA1 MMAL_FOURCC('W','M','A','1')
194 #define MMAL_ENCODING_WMA2 MMAL_FOURCC('W','M','A','2')
195 #define MMAL_ENCODING_WMAP MMAL_FOURCC('W','M','A','P')
196 #define MMAL_ENCODING_WMAL MMAL_FOURCC('W','M','A','L')
197 #define MMAL_ENCODING_WMAV MMAL_FOURCC('W','M','A','V')
198 #define MMAL_ENCODING_AMRNB MMAL_FOURCC('A','M','R','N')
199 #define MMAL_ENCODING_AMRWB MMAL_FOURCC('A','M','R','W')
200 #define MMAL_ENCODING_AMRWBP MMAL_FOURCC('A','M','R','P')
201 #define MMAL_ENCODING_AC3 MMAL_FOURCC('A','C','3',' ')
202 #define MMAL_ENCODING_EAC3 MMAL_FOURCC('E','A','C','3')
203 #define MMAL_ENCODING_DTS MMAL_FOURCC('D','T','S',' ')
204 #define MMAL_ENCODING_MLP MMAL_FOURCC('M','L','P',' ')
205 #define MMAL_ENCODING_FLAC MMAL_FOURCC('F','L','A','C')
206 #define MMAL_ENCODING_VORBIS MMAL_FOURCC('V','O','R','B')
207 #define MMAL_ENCODING_SPEEX MMAL_FOURCC('S','P','X',' ')
208 #define MMAL_ENCODING_ATRAC3 MMAL_FOURCC('A','T','R','3')
209 #define MMAL_ENCODING_ATRACX MMAL_FOURCC('A','T','R','X')
210 #define MMAL_ENCODING_ATRACL MMAL_FOURCC('A','T','R','L')
211 #define MMAL_ENCODING_MIDI MMAL_FOURCC('M','I','D','I')
212 #define MMAL_ENCODING_EVRC MMAL_FOURCC('E','V','R','C')
213 #define MMAL_ENCODING_NELLYMOSER MMAL_FOURCC('N','E','L','Y')
214 #define MMAL_ENCODING_QCELP MMAL_FOURCC('Q','C','E','L')
215 #define MMAL_ENCODING_MP4V_DIVX_DRM MMAL_FOURCC('M','4','V','D')
216 /* @} */
217 
218 /* @} MmalEncodings List */
219 
224 /* @{ */
225 
227 /* @{ */
229 #define MMAL_ENCODING_VARIANT_H264_DEFAULT 0
230 
231 #define MMAL_ENCODING_VARIANT_H264_AVC1 MMAL_FOURCC('A','V','C','1')
232 
233 #define MMAL_ENCODING_VARIANT_H264_RAW MMAL_FOURCC('R','A','W',' ')
234 /* @} */
235 
237 /* @{ */
239 #define MMAL_ENCODING_VARIANT_MP4A_DEFAULT 0
240 
241 #define MMAL_ENCODING_VARIANT_MP4A_ADTS MMAL_FOURCC('A','D','T','S')
242 /* @} */
243 
244 /* @} MmalEncodingVariants List */
245 
250 /* @{ */
251 
253 #define MMAL_COLOR_SPACE_UNKNOWN 0
254 
255 #define MMAL_COLOR_SPACE_ITUR_BT601 MMAL_FOURCC('Y','6','0','1')
256 
257 #define MMAL_COLOR_SPACE_ITUR_BT709 MMAL_FOURCC('Y','7','0','9')
258 
259 #define MMAL_COLOR_SPACE_JPEG_JFIF MMAL_FOURCC('Y','J','F','I')
260 
261 #define MMAL_COLOR_SPACE_FCC MMAL_FOURCC('Y','F','C','C')
262 
263 #define MMAL_COLOR_SPACE_SMPTE240M MMAL_FOURCC('Y','2','4','0')
264 
265 #define MMAL_COLOR_SPACE_BT470_2_M MMAL_FOURCC('Y','_','_','M')
266 
267 #define MMAL_COLOR_SPACE_BT470_2_BG MMAL_FOURCC('Y','_','B','G')
268 
269 #define MMAL_COLOR_SPACE_JFIF_Y16_255 MMAL_FOURCC('Y','Y','1','6')
270 /* @} MmalColorSpace List */
271 
272 #endif /* MMAL_ENCODINGS_H */