FFmpeg
raw.c
Go to the documentation of this file.
1 /*
2  * Raw Video Codec
3  * Copyright (c) 2001 Fabrice Bellard
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg 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 GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * Raw Video Codec
25  */
26 
27 #include "libavutil/macros.h"
28 #include "avcodec.h"
29 #include "raw.h"
30 
31 static const PixelFormatTag raw_pix_fmt_tags[] = {
32  { AV_PIX_FMT_YUV420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */
33  { AV_PIX_FMT_YUV420P, MKTAG('I', 'Y', 'U', 'V') },
34  { AV_PIX_FMT_YUV420P, MKTAG('y', 'v', '1', '2') },
35  { AV_PIX_FMT_YUV420P, MKTAG('Y', 'V', '1', '2') },
36  { AV_PIX_FMT_YUV410P, MKTAG('Y', 'U', 'V', '9') },
37  { AV_PIX_FMT_YUV410P, MKTAG('Y', 'V', 'U', '9') },
38  { AV_PIX_FMT_YUV411P, MKTAG('Y', '4', '1', 'B') },
39  { AV_PIX_FMT_YUV422P, MKTAG('Y', '4', '2', 'B') },
40  { AV_PIX_FMT_YUV422P, MKTAG('P', '4', '2', '2') },
41  { AV_PIX_FMT_YUV422P, MKTAG('Y', 'V', '1', '6') },
42  /* yuvjXXX formats are deprecated hacks specific to libav*,
43  they are identical to yuvXXX */
44  { AV_PIX_FMT_YUVJ420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */
45  { AV_PIX_FMT_YUVJ420P, MKTAG('I', 'Y', 'U', 'V') },
46  { AV_PIX_FMT_YUVJ420P, MKTAG('Y', 'V', '1', '2') },
47  { AV_PIX_FMT_YUVJ422P, MKTAG('Y', '4', '2', 'B') },
48  { AV_PIX_FMT_YUVJ422P, MKTAG('P', '4', '2', '2') },
49  { AV_PIX_FMT_GRAY8, MKTAG('Y', '8', '0', '0') },
50  { AV_PIX_FMT_GRAY8, MKTAG('Y', '8', ' ', ' ') },
51 
52  { AV_PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */
53  { AV_PIX_FMT_YUYV422, MKTAG('Y', '4', '2', '2') },
54  { AV_PIX_FMT_YUYV422, MKTAG('V', '4', '2', '2') },
55  { AV_PIX_FMT_YUYV422, MKTAG('V', 'Y', 'U', 'Y') },
56  { AV_PIX_FMT_YUYV422, MKTAG('Y', 'U', 'N', 'V') },
57  { AV_PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', 'V') },
58  { AV_PIX_FMT_YVYU422, MKTAG('Y', 'V', 'Y', 'U') }, /* Philips */
59  { AV_PIX_FMT_UYVY422, MKTAG('U', 'Y', 'V', 'Y') },
60  { AV_PIX_FMT_UYVY422, MKTAG('H', 'D', 'Y', 'C') },
61  { AV_PIX_FMT_UYVY422, MKTAG('U', 'Y', 'N', 'V') },
62  { AV_PIX_FMT_UYVY422, MKTAG('U', 'Y', 'N', 'Y') },
63  { AV_PIX_FMT_UYVY422, MKTAG('u', 'y', 'v', '1') },
64  { AV_PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', '1') },
65  { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', 'R', 'n') }, /* Avid AVI Codec 1:1 */
66  { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', '1', 'x') }, /* Avid 1:1x */
67  { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', 'u', 'p') },
68  { AV_PIX_FMT_UYVY422, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */
69  { AV_PIX_FMT_UYVY422, MKTAG('a', 'u', 'v', '2') },
70  { AV_PIX_FMT_UYVY422, MKTAG('c', 'y', 'u', 'v') }, /* CYUV is also Creative YUV */
71  { AV_PIX_FMT_UYYVYY411, MKTAG('Y', '4', '1', '1') },
72  { AV_PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') },
73  { AV_PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') },
74  { AV_PIX_FMT_NV21, MKTAG('N', 'V', '2', '1') },
75  { AV_PIX_FMT_VUYA, MKTAG('A', 'Y', 'U', 'V') }, /* MS 4:4:4:4 */
76  { AV_PIX_FMT_XV30LE, MKTAG('Y', '4', '1', '0') },
77  { AV_PIX_FMT_XV48LE, MKTAG('Y', '4', '1', '6') },
78  { AV_PIX_FMT_Y210LE, MKTAG('Y', '2', '1', '0') },
79  { AV_PIX_FMT_Y216LE, MKTAG('Y', '2', '1', '6') },
80 
81  /* nut */
82  { AV_PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) },
83  { AV_PIX_FMT_BGR555LE, MKTAG('B', 'G', 'R', 15) },
84  { AV_PIX_FMT_RGB565LE, MKTAG('R', 'G', 'B', 16) },
85  { AV_PIX_FMT_BGR565LE, MKTAG('B', 'G', 'R', 16) },
86  { AV_PIX_FMT_RGB555BE, MKTAG(15 , 'B', 'G', 'R') },
87  { AV_PIX_FMT_BGR555BE, MKTAG(15 , 'R', 'G', 'B') },
88  { AV_PIX_FMT_RGB565BE, MKTAG(16 , 'B', 'G', 'R') },
89  { AV_PIX_FMT_BGR565BE, MKTAG(16 , 'R', 'G', 'B') },
90  { AV_PIX_FMT_RGB444LE, MKTAG('R', 'G', 'B', 12) },
91  { AV_PIX_FMT_BGR444LE, MKTAG('B', 'G', 'R', 12) },
92  { AV_PIX_FMT_RGB444BE, MKTAG(12 , 'B', 'G', 'R') },
93  { AV_PIX_FMT_BGR444BE, MKTAG(12 , 'R', 'G', 'B') },
94  { AV_PIX_FMT_RGBA64LE, MKTAG('R', 'B', 'A', 64 ) },
95  { AV_PIX_FMT_BGRA64LE, MKTAG('B', 'R', 'A', 64 ) },
96  { AV_PIX_FMT_RGBA64BE, MKTAG(64 , 'R', 'B', 'A') },
97  { AV_PIX_FMT_BGRA64BE, MKTAG(64 , 'B', 'R', 'A') },
98  { AV_PIX_FMT_RGBA, MKTAG('R', 'G', 'B', 'A') },
99  { AV_PIX_FMT_RGB0, MKTAG('R', 'G', 'B', 0 ) },
100  { AV_PIX_FMT_BGRA, MKTAG('B', 'G', 'R', 'A') },
101  { AV_PIX_FMT_BGR0, MKTAG('B', 'G', 'R', 0 ) },
102  { AV_PIX_FMT_ABGR, MKTAG('A', 'B', 'G', 'R') },
103  { AV_PIX_FMT_0BGR, MKTAG( 0 , 'B', 'G', 'R') },
104  { AV_PIX_FMT_ARGB, MKTAG('A', 'R', 'G', 'B') },
105  { AV_PIX_FMT_0RGB, MKTAG( 0 , 'R', 'G', 'B') },
106  { AV_PIX_FMT_RGB24, MKTAG('R', 'G', 'B', 24 ) },
107  { AV_PIX_FMT_BGR24, MKTAG('B', 'G', 'R', 24 ) },
108  { AV_PIX_FMT_YUV411P, MKTAG('4', '1', '1', 'P') },
109  { AV_PIX_FMT_YUV422P, MKTAG('4', '2', '2', 'P') },
110  { AV_PIX_FMT_YUVJ422P, MKTAG('4', '2', '2', 'P') },
111  { AV_PIX_FMT_YUV440P, MKTAG('4', '4', '0', 'P') },
112  { AV_PIX_FMT_YUVJ440P, MKTAG('4', '4', '0', 'P') },
113  { AV_PIX_FMT_YUV444P, MKTAG('4', '4', '4', 'P') },
114  { AV_PIX_FMT_YUVJ444P, MKTAG('4', '4', '4', 'P') },
115  { AV_PIX_FMT_MONOWHITE,MKTAG('B', '1', 'W', '0') },
116  { AV_PIX_FMT_MONOBLACK,MKTAG('B', '0', 'W', '1') },
117  { AV_PIX_FMT_BGR8, MKTAG('B', 'G', 'R', 8 ) },
118  { AV_PIX_FMT_RGB8, MKTAG('R', 'G', 'B', 8 ) },
119  { AV_PIX_FMT_BGR4, MKTAG('B', 'G', 'R', 4 ) },
120  { AV_PIX_FMT_RGB4, MKTAG('R', 'G', 'B', 4 ) },
121  { AV_PIX_FMT_RGB4_BYTE,MKTAG('B', '4', 'B', 'Y') },
122  { AV_PIX_FMT_BGR4_BYTE,MKTAG('R', '4', 'B', 'Y') },
123  { AV_PIX_FMT_RGB48LE, MKTAG('R', 'G', 'B', 48 ) },
124  { AV_PIX_FMT_RGB48BE, MKTAG( 48, 'R', 'G', 'B') },
125  { AV_PIX_FMT_BGR48LE, MKTAG('B', 'G', 'R', 48 ) },
126  { AV_PIX_FMT_BGR48BE, MKTAG( 48, 'B', 'G', 'R') },
127  { AV_PIX_FMT_GRAY9LE, MKTAG('Y', '1', 0 , 9 ) },
128  { AV_PIX_FMT_GRAY9BE, MKTAG( 9 , 0 , '1', 'Y') },
129  { AV_PIX_FMT_GRAY10LE, MKTAG('Y', '1', 0 , 10 ) },
130  { AV_PIX_FMT_GRAY10BE, MKTAG(10 , 0 , '1', 'Y') },
131  { AV_PIX_FMT_GRAY12LE, MKTAG('Y', '1', 0 , 12 ) },
132  { AV_PIX_FMT_GRAY12BE, MKTAG(12 , 0 , '1', 'Y') },
133  { AV_PIX_FMT_GRAY14LE, MKTAG('Y', '1', 0 , 14 ) },
134  { AV_PIX_FMT_GRAY14BE, MKTAG(14 , 0 , '1', 'Y') },
135  { AV_PIX_FMT_GRAY16LE, MKTAG('Y', '1', 0 , 16 ) },
136  { AV_PIX_FMT_GRAY16BE, MKTAG(16 , 0 , '1', 'Y') },
137  { AV_PIX_FMT_YUV420P9LE, MKTAG('Y', '3', 11 , 9 ) },
138  { AV_PIX_FMT_YUV420P9BE, MKTAG( 9 , 11 , '3', 'Y') },
139  { AV_PIX_FMT_YUV422P9LE, MKTAG('Y', '3', 10 , 9 ) },
140  { AV_PIX_FMT_YUV422P9BE, MKTAG( 9 , 10 , '3', 'Y') },
141  { AV_PIX_FMT_YUV444P9LE, MKTAG('Y', '3', 0 , 9 ) },
142  { AV_PIX_FMT_YUV444P9BE, MKTAG( 9 , 0 , '3', 'Y') },
143  { AV_PIX_FMT_YUV420P10LE, MKTAG('Y', '3', 11 , 10 ) },
144  { AV_PIX_FMT_YUV420P10BE, MKTAG(10 , 11 , '3', 'Y') },
145  { AV_PIX_FMT_YUV422P10LE, MKTAG('Y', '3', 10 , 10 ) },
146  { AV_PIX_FMT_YUV422P10BE, MKTAG(10 , 10 , '3', 'Y') },
147  { AV_PIX_FMT_YUV444P10LE, MKTAG('Y', '3', 0 , 10 ) },
148  { AV_PIX_FMT_YUV444P10BE, MKTAG(10 , 0 , '3', 'Y') },
149  { AV_PIX_FMT_YUV420P12LE, MKTAG('Y', '3', 11 , 12 ) },
150  { AV_PIX_FMT_YUV420P12BE, MKTAG(12 , 11 , '3', 'Y') },
151  { AV_PIX_FMT_YUV422P12LE, MKTAG('Y', '3', 10 , 12 ) },
152  { AV_PIX_FMT_YUV422P12BE, MKTAG(12 , 10 , '3', 'Y') },
153  { AV_PIX_FMT_YUV444P12LE, MKTAG('Y', '3', 0 , 12 ) },
154  { AV_PIX_FMT_YUV444P12BE, MKTAG(12 , 0 , '3', 'Y') },
155  { AV_PIX_FMT_YUV420P14LE, MKTAG('Y', '3', 11 , 14 ) },
156  { AV_PIX_FMT_YUV420P14BE, MKTAG(14 , 11 , '3', 'Y') },
157  { AV_PIX_FMT_YUV422P14LE, MKTAG('Y', '3', 10 , 14 ) },
158  { AV_PIX_FMT_YUV422P14BE, MKTAG(14 , 10 , '3', 'Y') },
159  { AV_PIX_FMT_YUV444P14LE, MKTAG('Y', '3', 0 , 14 ) },
160  { AV_PIX_FMT_YUV444P14BE, MKTAG(14 , 0 , '3', 'Y') },
161  { AV_PIX_FMT_YUV420P16LE, MKTAG('Y', '3', 11 , 16 ) },
162  { AV_PIX_FMT_YUV420P16BE, MKTAG(16 , 11 , '3', 'Y') },
163  { AV_PIX_FMT_YUV422P16LE, MKTAG('Y', '3', 10 , 16 ) },
164  { AV_PIX_FMT_YUV422P16BE, MKTAG(16 , 10 , '3', 'Y') },
165  { AV_PIX_FMT_YUV444P16LE, MKTAG('Y', '3', 0 , 16 ) },
166  { AV_PIX_FMT_YUV444P16BE, MKTAG(16 , 0 , '3', 'Y') },
167  { AV_PIX_FMT_YUVA420P, MKTAG('Y', '4', 11 , 8 ) },
168  { AV_PIX_FMT_YUVA422P, MKTAG('Y', '4', 10 , 8 ) },
169  { AV_PIX_FMT_YUVA444P, MKTAG('Y', '4', 0 , 8 ) },
170  { AV_PIX_FMT_YA8, MKTAG('Y', '2', 0 , 8 ) },
171  { AV_PIX_FMT_PAL8, MKTAG('P', 'A', 'L', 8 ) },
172 
173  { AV_PIX_FMT_YUVA420P9LE, MKTAG('Y', '4', 11 , 9 ) },
174  { AV_PIX_FMT_YUVA420P9BE, MKTAG( 9 , 11 , '4', 'Y') },
175  { AV_PIX_FMT_YUVA422P9LE, MKTAG('Y', '4', 10 , 9 ) },
176  { AV_PIX_FMT_YUVA422P9BE, MKTAG( 9 , 10 , '4', 'Y') },
177  { AV_PIX_FMT_YUVA444P9LE, MKTAG('Y', '4', 0 , 9 ) },
178  { AV_PIX_FMT_YUVA444P9BE, MKTAG( 9 , 0 , '4', 'Y') },
179  { AV_PIX_FMT_YUVA420P10LE, MKTAG('Y', '4', 11 , 10 ) },
180  { AV_PIX_FMT_YUVA420P10BE, MKTAG(10 , 11 , '4', 'Y') },
181  { AV_PIX_FMT_YUVA422P10LE, MKTAG('Y', '4', 10 , 10 ) },
182  { AV_PIX_FMT_YUVA422P10BE, MKTAG(10 , 10 , '4', 'Y') },
183  { AV_PIX_FMT_YUVA444P10LE, MKTAG('Y', '4', 0 , 10 ) },
184  { AV_PIX_FMT_YUVA444P10BE, MKTAG(10 , 0 , '4', 'Y') },
185  { AV_PIX_FMT_YUVA422P12LE, MKTAG('Y', '4', 10 , 12 ) },
186  { AV_PIX_FMT_YUVA422P12BE, MKTAG(12 , 10 , '4', 'Y') },
187  { AV_PIX_FMT_YUVA444P12LE, MKTAG('Y', '4', 0 , 12 ) },
188  { AV_PIX_FMT_YUVA444P12BE, MKTAG(12 , 0 , '4', 'Y') },
189  { AV_PIX_FMT_YUVA420P16LE, MKTAG('Y', '4', 11 , 16 ) },
190  { AV_PIX_FMT_YUVA420P16BE, MKTAG(16 , 11 , '4', 'Y') },
191  { AV_PIX_FMT_YUVA422P16LE, MKTAG('Y', '4', 10 , 16 ) },
192  { AV_PIX_FMT_YUVA422P16BE, MKTAG(16 , 10 , '4', 'Y') },
193  { AV_PIX_FMT_YUVA444P16LE, MKTAG('Y', '4', 0 , 16 ) },
194  { AV_PIX_FMT_YUVA444P16BE, MKTAG(16 , 0 , '4', 'Y') },
195 
196  { AV_PIX_FMT_GBRP, MKTAG('G', '3', 00 , 8 ) },
197  { AV_PIX_FMT_GBRP9LE, MKTAG('G', '3', 00 , 9 ) },
198  { AV_PIX_FMT_GBRP9BE, MKTAG( 9 , 00 , '3', 'G') },
199  { AV_PIX_FMT_GBRP10LE, MKTAG('G', '3', 00 , 10 ) },
200  { AV_PIX_FMT_GBRP10BE, MKTAG(10 , 00 , '3', 'G') },
201  { AV_PIX_FMT_GBRP12LE, MKTAG('G', '3', 00 , 12 ) },
202  { AV_PIX_FMT_GBRP12BE, MKTAG(12 , 00 , '3', 'G') },
203  { AV_PIX_FMT_GBRP14LE, MKTAG('G', '3', 00 , 14 ) },
204  { AV_PIX_FMT_GBRP14BE, MKTAG(14 , 00 , '3', 'G') },
205  { AV_PIX_FMT_GBRP16LE, MKTAG('G', '3', 00 , 16 ) },
206  { AV_PIX_FMT_GBRP16BE, MKTAG(16 , 00 , '3', 'G') },
207 
208  { AV_PIX_FMT_GBRAP, MKTAG('G', '4', 00 , 8 ) },
209  { AV_PIX_FMT_GBRAP10LE, MKTAG('G', '4', 00 , 10 ) },
210  { AV_PIX_FMT_GBRAP10BE, MKTAG(10 , 00 , '4', 'G') },
211  { AV_PIX_FMT_GBRAP12LE, MKTAG('G', '4', 00 , 12 ) },
212  { AV_PIX_FMT_GBRAP12BE, MKTAG(12 , 00 , '4', 'G') },
213  { AV_PIX_FMT_GBRAP14LE, MKTAG('G', '4', 00 , 14 ) },
214  { AV_PIX_FMT_GBRAP14BE, MKTAG(14 , 00 , '4', 'G') },
215  { AV_PIX_FMT_GBRAP16LE, MKTAG('G', '4', 00 , 16 ) },
216  { AV_PIX_FMT_GBRAP16BE, MKTAG(16 , 00 , '4', 'G') },
217 
218  { AV_PIX_FMT_XYZ12LE, MKTAG('X', 'Y', 'Z' , 36 ) },
219  { AV_PIX_FMT_XYZ12BE, MKTAG(36 , 'Z' , 'Y', 'X') },
220 
221  { AV_PIX_FMT_BAYER_BGGR8, MKTAG(0xBA, 'B', 'G', 8 ) },
222  { AV_PIX_FMT_BAYER_BGGR16LE, MKTAG(0xBA, 'B', 'G', 16 ) },
223  { AV_PIX_FMT_BAYER_BGGR16BE, MKTAG(16 , 'G', 'B', 0xBA) },
224  { AV_PIX_FMT_BAYER_RGGB8, MKTAG(0xBA, 'R', 'G', 8 ) },
225  { AV_PIX_FMT_BAYER_RGGB16LE, MKTAG(0xBA, 'R', 'G', 16 ) },
226  { AV_PIX_FMT_BAYER_RGGB16BE, MKTAG(16 , 'G', 'R', 0xBA) },
227  { AV_PIX_FMT_BAYER_GBRG8, MKTAG(0xBA, 'G', 'B', 8 ) },
228  { AV_PIX_FMT_BAYER_GBRG16LE, MKTAG(0xBA, 'G', 'B', 16 ) },
229  { AV_PIX_FMT_BAYER_GBRG16BE, MKTAG(16, 'B', 'G', 0xBA) },
230  { AV_PIX_FMT_BAYER_GRBG8, MKTAG(0xBA, 'G', 'R', 8 ) },
231  { AV_PIX_FMT_BAYER_GRBG16LE, MKTAG(0xBA, 'G', 'R', 16 ) },
232  { AV_PIX_FMT_BAYER_GRBG16BE, MKTAG(16, 'R', 'G', 0xBA) },
233 
234  /* quicktime */
235  { AV_PIX_FMT_YUV420P, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */
236  { AV_PIX_FMT_YUV411P, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */
237  { AV_PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },
238  { AV_PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', 'y') },
239  { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', 'U', 'I') }, /* FIXME merge both fields */
240  { AV_PIX_FMT_UYVY422, MKTAG('b', 'x', 'y', 'v') },
241  { AV_PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', '2') },
242  { AV_PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', 's') },
243  { AV_PIX_FMT_YUYV422, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */
244  { AV_PIX_FMT_VYU444, MKTAG('v', '3', '0', '8') },
245  { AV_PIX_FMT_UYVA, MKTAG('v', '4', '0', '8') },
246  { AV_PIX_FMT_V30XLE, MKTAG('v', '4', '1', '0') },
247  { AV_PIX_FMT_AYUV, MKTAG('y', '4', '0', '8') },
248  { AV_PIX_FMT_RGB555LE,MKTAG('L', '5', '5', '5') },
249  { AV_PIX_FMT_RGB565LE,MKTAG('L', '5', '6', '5') },
250  { AV_PIX_FMT_RGB565BE,MKTAG('B', '5', '6', '5') },
251  { AV_PIX_FMT_BGR24, MKTAG('2', '4', 'B', 'G') },
252  { AV_PIX_FMT_BGR24, MKTAG('b', 'x', 'b', 'g') },
253  { AV_PIX_FMT_BGRA, MKTAG('B', 'G', 'R', 'A') },
254  { AV_PIX_FMT_RGBA, MKTAG('R', 'G', 'B', 'A') },
255  { AV_PIX_FMT_RGB24, MKTAG('b', 'x', 'r', 'g') },
256  { AV_PIX_FMT_ABGR, MKTAG('A', 'B', 'G', 'R') },
257  { AV_PIX_FMT_GRAY16BE,MKTAG('b', '1', '6', 'g') },
258  { AV_PIX_FMT_RGB48BE, MKTAG('b', '4', '8', 'r') },
259  { AV_PIX_FMT_RGBA64BE,MKTAG('b', '6', '4', 'a') },
260  { AV_PIX_FMT_BAYER_RGGB16BE, MKTAG('B', 'G', 'G', 'R') },
261 
262  /* vlc */
263  { AV_PIX_FMT_YUV410P, MKTAG('I', '4', '1', '0') },
264  { AV_PIX_FMT_YUV411P, MKTAG('I', '4', '1', '1') },
265  { AV_PIX_FMT_YUV422P, MKTAG('I', '4', '2', '2') },
266  { AV_PIX_FMT_YUV440P, MKTAG('I', '4', '4', '0') },
267  { AV_PIX_FMT_YUV444P, MKTAG('I', '4', '4', '4') },
268  { AV_PIX_FMT_YUVJ420P, MKTAG('J', '4', '2', '0') },
269  { AV_PIX_FMT_YUVJ422P, MKTAG('J', '4', '2', '2') },
270  { AV_PIX_FMT_YUVJ440P, MKTAG('J', '4', '4', '0') },
271  { AV_PIX_FMT_YUVJ444P, MKTAG('J', '4', '4', '4') },
272  { AV_PIX_FMT_YUVA444P, MKTAG('Y', 'U', 'V', 'A') },
273  { AV_PIX_FMT_YUVA420P, MKTAG('I', '4', '0', 'A') },
274  { AV_PIX_FMT_YUVA422P, MKTAG('I', '4', '2', 'A') },
275  { AV_PIX_FMT_RGB8, MKTAG('R', 'G', 'B', '2') },
276  { AV_PIX_FMT_RGB555LE, MKTAG('R', 'V', '1', '5') },
277  { AV_PIX_FMT_RGB565LE, MKTAG('R', 'V', '1', '6') },
278  { AV_PIX_FMT_BGR24, MKTAG('R', 'V', '2', '4') },
279  { AV_PIX_FMT_BGR0, MKTAG('R', 'V', '3', '2') },
280  { AV_PIX_FMT_RGBA, MKTAG('A', 'V', '3', '2') },
281  { AV_PIX_FMT_YUV420P9LE, MKTAG('I', '0', '9', 'L') },
282  { AV_PIX_FMT_YUV420P9BE, MKTAG('I', '0', '9', 'B') },
283  { AV_PIX_FMT_YUV422P9LE, MKTAG('I', '2', '9', 'L') },
284  { AV_PIX_FMT_YUV422P9BE, MKTAG('I', '2', '9', 'B') },
285  { AV_PIX_FMT_YUV444P9LE, MKTAG('I', '4', '9', 'L') },
286  { AV_PIX_FMT_YUV444P9BE, MKTAG('I', '4', '9', 'B') },
287  { AV_PIX_FMT_YUV420P10LE, MKTAG('I', '0', 'A', 'L') },
288  { AV_PIX_FMT_YUV420P10BE, MKTAG('I', '0', 'A', 'B') },
289  { AV_PIX_FMT_YUV422P10LE, MKTAG('I', '2', 'A', 'L') },
290  { AV_PIX_FMT_YUV422P10BE, MKTAG('I', '2', 'A', 'B') },
291  { AV_PIX_FMT_YUV444P10LE, MKTAG('I', '4', 'A', 'L') },
292  { AV_PIX_FMT_YUV444P10BE, MKTAG('I', '4', 'A', 'B') },
293  { AV_PIX_FMT_YUV420P12LE, MKTAG('I', '0', 'C', 'L') },
294  { AV_PIX_FMT_YUV420P12BE, MKTAG('I', '0', 'C', 'B') },
295  { AV_PIX_FMT_YUV422P12LE, MKTAG('I', '2', 'C', 'L') },
296  { AV_PIX_FMT_YUV422P12BE, MKTAG('I', '2', 'C', 'B') },
297  { AV_PIX_FMT_YUV444P12LE, MKTAG('I', '4', 'C', 'L') },
298  { AV_PIX_FMT_YUV444P12BE, MKTAG('I', '4', 'C', 'B') },
299  { AV_PIX_FMT_YUV420P16LE, MKTAG('I', '0', 'F', 'L') },
300  { AV_PIX_FMT_YUV420P16BE, MKTAG('I', '0', 'F', 'B') },
301  { AV_PIX_FMT_YUV444P16LE, MKTAG('I', '4', 'F', 'L') },
302  { AV_PIX_FMT_YUV444P16BE, MKTAG('I', '4', 'F', 'B') },
303 
304  /* special */
305  { AV_PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */
306  { AV_PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */
307 
308  { AV_PIX_FMT_NONE, 0 },
309 };
310 
312 {
313  return raw_pix_fmt_tags;
314 }
315 
317 {
318  const PixelFormatTag *tags = raw_pix_fmt_tags;
319  while (tags->pix_fmt >= 0) {
320  if (tags->pix_fmt == fmt)
321  return tags->fourcc;
322  tags++;
323  }
324  return 0;
325 }
326 
327 static const PixelFormatTag pix_fmt_bps_avi[] = {
328  { AV_PIX_FMT_PAL8, 1 },
329  { AV_PIX_FMT_PAL8, 2 },
330  { AV_PIX_FMT_PAL8, 4 },
331  { AV_PIX_FMT_PAL8, 8 },
332  { AV_PIX_FMT_RGB444LE, 12 },
333  { AV_PIX_FMT_RGB555LE, 15 },
334  { AV_PIX_FMT_RGB555LE, 16 },
335  { AV_PIX_FMT_BGR24, 24 },
336  { AV_PIX_FMT_BGRA, 32 },
337  { AV_PIX_FMT_NONE, 0 },
338 };
339 
340 static const PixelFormatTag pix_fmt_bps_mov[] = {
341  { AV_PIX_FMT_PAL8, 1 },
342  { AV_PIX_FMT_PAL8, 2 },
343  { AV_PIX_FMT_PAL8, 4 },
344  { AV_PIX_FMT_PAL8, 8 },
345  { AV_PIX_FMT_RGB555BE, 16 },
346  { AV_PIX_FMT_RGB24, 24 },
347  { AV_PIX_FMT_ARGB, 32 },
348  { AV_PIX_FMT_PAL8, 33 },
349  { AV_PIX_FMT_NONE, 0 },
350 };
351 
352 static enum AVPixelFormat find_pix_fmt(const PixelFormatTag *tags,
353  unsigned int fourcc)
354 {
355  while (tags->pix_fmt != AV_PIX_FMT_NONE) {
356  if (tags->fourcc == fourcc)
357  return tags->pix_fmt;
358  tags++;
359  }
360  return AV_PIX_FMT_NONE;
361 }
362 
364  unsigned fourcc)
365 {
366  const PixelFormatTag *tags;
367 
368  switch (list) {
369  case PIX_FMT_LIST_RAW:
370  tags = raw_pix_fmt_tags;
371  break;
372  case PIX_FMT_LIST_AVI:
373  tags = pix_fmt_bps_avi;
374  break;
375  case PIX_FMT_LIST_MOV:
376  tags = pix_fmt_bps_mov;
377  break;
378  }
379  return find_pix_fmt(tags, fourcc);
380 }
AV_PIX_FMT_XYZ12LE
@ AV_PIX_FMT_XYZ12LE
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as lit...
Definition: pixfmt.h:196
AV_PIX_FMT_YUV420P9LE
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:154
AV_PIX_FMT_XV30LE
@ AV_PIX_FMT_XV30LE
packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channe...
Definition: pixfmt.h:415
AV_PIX_FMT_GRAY10BE
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
Definition: pixfmt.h:320
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
AV_PIX_FMT_BAYER_GBRG16LE
@ AV_PIX_FMT_BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:293
AV_PIX_FMT_BGR48LE
@ AV_PIX_FMT_BGR48LE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:146
AV_PIX_FMT_YA8
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
Definition: pixfmt.h:140
AV_PIX_FMT_BGRA64BE
@ AV_PIX_FMT_BGRA64BE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:204
avpriv_get_raw_pix_fmt_tags
const struct PixelFormatTag * avpriv_get_raw_pix_fmt_tags(void)
Definition: raw.c:311
PixelFormatTag
Definition: raw.h:32
AV_PIX_FMT_RGB444LE
@ AV_PIX_FMT_RGB444LE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:136
AV_PIX_FMT_GBRP16BE
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
Definition: pixfmt.h:171
AV_PIX_FMT_GBRP10BE
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
Definition: pixfmt.h:169
AV_PIX_FMT_YUV422P14LE
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:274
find_pix_fmt
static enum AVPixelFormat find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
Definition: raw.c:352
AV_PIX_FMT_YUVA444P10BE
@ AV_PIX_FMT_YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
Definition: pixfmt.h:185
AV_PIX_FMT_RGBA64BE
@ AV_PIX_FMT_RGBA64BE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:202
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:82
AV_PIX_FMT_YUV420P14BE
@ AV_PIX_FMT_YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:269
AV_PIX_FMT_YUV420P16LE
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:128
AV_PIX_FMT_GBRP14BE
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
Definition: pixfmt.h:281
AV_PIX_FMT_BGR24
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:76
AV_PIX_FMT_BGRA
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:102
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:106
AV_PIX_FMT_YUVA444P9BE
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
Definition: pixfmt.h:179
AV_PIX_FMT_YUV422P9BE
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:163
AV_PIX_FMT_BAYER_GRBG16BE
@ AV_PIX_FMT_BAYER_GRBG16BE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:296
AV_PIX_FMT_GRAY10LE
@ AV_PIX_FMT_GRAY10LE
Y , 10bpp, little-endian.
Definition: pixfmt.h:321
AV_PIX_FMT_GBRAP14BE
@ AV_PIX_FMT_GBRAP14BE
planar GBR 4:4:4:4 56bpp, big-endian
Definition: pixfmt.h:432
AV_PIX_FMT_RGB555BE
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:114
AV_PIX_FMT_YUV444P16LE
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:132
avcodec_pix_fmt_to_codec_tag
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat fmt)
Return a value representing the fourCC code associated to the pixel format pix_fmt,...
Definition: raw.c:316
AV_PIX_FMT_BAYER_GBRG16BE
@ AV_PIX_FMT_BAYER_GBRG16BE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:294
AV_PIX_FMT_GBRAP12LE
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
Definition: pixfmt.h:311
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:104
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:212
AV_PIX_FMT_YUV420P12LE
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:268
macros.h
AV_PIX_FMT_GRAY9LE
@ AV_PIX_FMT_GRAY9LE
Y , 9bpp, little-endian.
Definition: pixfmt.h:339
AV_PIX_FMT_YUVA444P16BE
@ AV_PIX_FMT_YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
Definition: pixfmt.h:191
AV_PIX_FMT_YUV444P10BE
@ AV_PIX_FMT_YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:161
AV_PIX_FMT_YUV420P10LE
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:156
PixelFormatTag::pix_fmt
enum AVPixelFormat pix_fmt
Definition: raw.h:33
AV_PIX_FMT_VUYA
@ AV_PIX_FMT_VUYA
packed VUYA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), VUYAVUYA...
Definition: pixfmt.h:401
raw.h
AV_PIX_FMT_YUV444P12LE
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:276
AV_PIX_FMT_YUV422P12BE
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:271
AV_PIX_FMT_YUV444P14LE
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:278
AV_PIX_FMT_BGR8
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: pixfmt.h:90
AV_PIX_FMT_BAYER_RGGB16BE
@ AV_PIX_FMT_BAYER_RGGB16BE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:292
AV_PIX_FMT_YUVJ422P
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:86
AV_PIX_FMT_GBRAP16BE
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
Definition: pixfmt.h:213
AV_PIX_FMT_GBRP16LE
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
Definition: pixfmt.h:172
AV_PIX_FMT_YUVA420P
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:108
AV_PIX_FMT_BAYER_RGGB16LE
@ AV_PIX_FMT_BAYER_RGGB16LE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:291
AV_PIX_FMT_BAYER_BGGR8
@ AV_PIX_FMT_BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: pixfmt.h:285
AV_PIX_FMT_GBRP12LE
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
Definition: pixfmt.h:280
AV_PIX_FMT_YUVA420P16BE
@ AV_PIX_FMT_YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
Definition: pixfmt.h:187
AV_PIX_FMT_RGB4
@ AV_PIX_FMT_RGB4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
Definition: pixfmt.h:94
AV_PIX_FMT_GBRP10LE
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
Definition: pixfmt.h:170
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:73
AV_PIX_FMT_YUVJ444P
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:87
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:100
AV_PIX_FMT_YUV444P10LE
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:162
AV_PIX_FMT_BAYER_RGGB8
@ AV_PIX_FMT_BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
Definition: pixfmt.h:286
AV_PIX_FMT_YUVA422P10LE
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: pixfmt.h:184
AV_PIX_FMT_BAYER_GRBG16LE
@ AV_PIX_FMT_BAYER_GRBG16LE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:295
AV_PIX_FMT_YUV444P9BE
@ AV_PIX_FMT_YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:159
PIX_FMT_LIST_AVI
@ PIX_FMT_LIST_AVI
Definition: raw.h:41
AV_PIX_FMT_YUV422P10BE
@ AV_PIX_FMT_YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:157
AV_PIX_FMT_YUV422P16LE
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:130
AV_PIX_FMT_RGB565LE
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: pixfmt.h:113
AV_PIX_FMT_Y216LE
@ AV_PIX_FMT_Y216LE
packed YUV 4:2:2 like YUYV422, 32bpp, little-endian
Definition: pixfmt.h:461
AV_PIX_FMT_GBRAP12BE
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
Definition: pixfmt.h:310
AV_PIX_FMT_YUYV422
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:74
AV_PIX_FMT_RGB48LE
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:110
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:85
AV_PIX_FMT_MONOBLACK
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:83
AV_PIX_FMT_YUVA422P12LE
@ AV_PIX_FMT_YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
Definition: pixfmt.h:367
AV_PIX_FMT_BGR565LE
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
Definition: pixfmt.h:118
AV_PIX_FMT_RGBA64LE
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:203
AV_PIX_FMT_YUVA444P12BE
@ AV_PIX_FMT_YUVA444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
Definition: pixfmt.h:368
list
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining list
Definition: filter_design.txt:25
AV_PIX_FMT_YUVA444P9LE
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
Definition: pixfmt.h:180
AV_PIX_FMT_Y210LE
@ AV_PIX_FMT_Y210LE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
Definition: pixfmt.h:382
AV_PIX_FMT_YUVA420P16LE
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: pixfmt.h:188
AV_PIX_FMT_RGB8
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)
Definition: pixfmt.h:93
AV_PIX_FMT_BGR0
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: pixfmt.h:265
AV_PIX_FMT_BGR4
@ AV_PIX_FMT_BGR4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
Definition: pixfmt.h:91
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
AV_PIX_FMT_BGR555BE
@ AV_PIX_FMT_BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:119
AV_PIX_FMT_YUVA420P9LE
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
Definition: pixfmt.h:176
AV_PIX_FMT_ABGR
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:101
AV_PIX_FMT_YUV420P14LE
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:270
PixelFormatTagLists
PixelFormatTagLists
Definition: raw.h:39
AV_PIX_FMT_YUV444P14BE
@ AV_PIX_FMT_YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:277
AV_PIX_FMT_BGR4_BYTE
@ AV_PIX_FMT_BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: pixfmt.h:92
AV_PIX_FMT_YUV420P9BE
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
Definition: pixfmt.h:153
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:75
avpriv_pix_fmt_find
enum AVPixelFormat avpriv_pix_fmt_find(enum PixelFormatTagLists list, unsigned fourcc)
Definition: raw.c:363
AV_PIX_FMT_BAYER_BGGR16LE
@ AV_PIX_FMT_BAYER_BGGR16LE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:289
AV_PIX_FMT_YUV420P12BE
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:267
AV_PIX_FMT_YUV422P10LE
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:158
AV_PIX_FMT_RGB444BE
@ AV_PIX_FMT_RGB444BE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
Definition: pixfmt.h:137
AV_PIX_FMT_YUV422P14BE
@ AV_PIX_FMT_YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:273
AV_PIX_FMT_GRAY12LE
@ AV_PIX_FMT_GRAY12LE
Y , 12bpp, little-endian.
Definition: pixfmt.h:319
PIX_FMT_LIST_RAW
@ PIX_FMT_LIST_RAW
Definition: raw.h:40
AV_PIX_FMT_GBRP9BE
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
Definition: pixfmt.h:167
AV_PIX_FMT_YUV420P10BE
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:155
AV_PIX_FMT_BGR444BE
@ AV_PIX_FMT_BGR444BE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
Definition: pixfmt.h:139
AV_PIX_FMT_GBRP9LE
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
Definition: pixfmt.h:168
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:174
AV_PIX_FMT_GBRAP10LE
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
Definition: pixfmt.h:314
AV_PIX_FMT_BGR565BE
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
Definition: pixfmt.h:117
AV_PIX_FMT_RGB0
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: pixfmt.h:263
AV_PIX_FMT_YUVA420P10LE
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: pixfmt.h:182
raw_pix_fmt_tags
static const PixelFormatTag raw_pix_fmt_tags[]
Definition: raw.c:31
AV_PIX_FMT_AYUV
@ AV_PIX_FMT_AYUV
packed AYUV 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), AYUVAYUV...
Definition: pixfmt.h:442
AV_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:99
AV_PIX_FMT_BGRA64LE
@ AV_PIX_FMT_BGRA64LE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:205
AV_PIX_FMT_YUVA422P10BE
@ AV_PIX_FMT_YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
Definition: pixfmt.h:183
AV_PIX_FMT_UYVA
@ AV_PIX_FMT_UYVA
packed UYVA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
Definition: pixfmt.h:444
AV_PIX_FMT_YUVA444P12LE
@ AV_PIX_FMT_YUVA444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
Definition: pixfmt.h:369
AV_PIX_FMT_YUVA422P9BE
@ AV_PIX_FMT_YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
Definition: pixfmt.h:177
AV_PIX_FMT_RGB555LE
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:115
AV_PIX_FMT_RGB48BE
@ AV_PIX_FMT_RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:109
AV_PIX_FMT_GRAY9BE
@ AV_PIX_FMT_GRAY9BE
Y , 9bpp, big-endian.
Definition: pixfmt.h:338
AV_PIX_FMT_BAYER_GBRG8
@ AV_PIX_FMT_BAYER_GBRG8
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
Definition: pixfmt.h:287
pix_fmt_bps_avi
static const PixelFormatTag pix_fmt_bps_avi[]
Definition: raw.c:327
AV_PIX_FMT_YUVJ440P
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition: pixfmt.h:107
AV_PIX_FMT_XYZ12BE
@ AV_PIX_FMT_XYZ12BE
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big...
Definition: pixfmt.h:197
AV_PIX_FMT_NV21
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
Definition: pixfmt.h:97
AV_PIX_FMT_RGB4_BYTE
@ AV_PIX_FMT_RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: pixfmt.h:95
AV_PIX_FMT_YUV444P16BE
@ AV_PIX_FMT_YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:133
avcodec.h
AV_PIX_FMT_GBRAP16LE
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
Definition: pixfmt.h:214
pix_fmt_bps_mov
static const PixelFormatTag pix_fmt_bps_mov[]
Definition: raw.c:340
AV_PIX_FMT_PAL8
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition: pixfmt.h:84
AV_PIX_FMT_GRAY12BE
@ AV_PIX_FMT_GRAY12BE
Y , 12bpp, big-endian.
Definition: pixfmt.h:318
AV_PIX_FMT_YVYU422
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
Definition: pixfmt.h:207
AV_PIX_FMT_0BGR
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
Definition: pixfmt.h:264
AV_PIX_FMT_NV12
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:96
AV_PIX_FMT_BAYER_BGGR16BE
@ AV_PIX_FMT_BAYER_BGGR16BE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:290
AV_PIX_FMT_GBRP12BE
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
Definition: pixfmt.h:279
AV_PIX_FMT_UYVY422
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:88
AV_PIX_FMT_YUV444P12BE
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:275
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_PIX_FMT_XV48LE
@ AV_PIX_FMT_XV48LE
packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
Definition: pixfmt.h:464
AV_PIX_FMT_YUV444P9LE
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:160
AV_PIX_FMT_YUVA420P10BE
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
Definition: pixfmt.h:181
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AV_PIX_FMT_RGB565BE
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: pixfmt.h:112
AV_PIX_FMT_YUV420P16BE
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:129
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:165
AV_PIX_FMT_YUV422P16BE
@ AV_PIX_FMT_YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:131
AV_PIX_FMT_GRAY16LE
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
Definition: pixfmt.h:105
AV_PIX_FMT_V30XLE
@ AV_PIX_FMT_V30XLE
packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
Definition: pixfmt.h:449
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
AV_PIX_FMT_YUVA444P10LE
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: pixfmt.h:186
AV_PIX_FMT_BGR555LE
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:120
AV_PIX_FMT_GRAY14LE
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
Definition: pixfmt.h:361
PIX_FMT_LIST_MOV
@ PIX_FMT_LIST_MOV
Definition: raw.h:42
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:80
AV_PIX_FMT_GRAY14BE
@ AV_PIX_FMT_GRAY14BE
Y , 14bpp, big-endian.
Definition: pixfmt.h:360
AV_PIX_FMT_YUVA422P16BE
@ AV_PIX_FMT_YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
Definition: pixfmt.h:189
AV_PIX_FMT_YUV422P9LE
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:164
AV_PIX_FMT_YUVA422P16LE
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: pixfmt.h:190
PixelFormatTag::fourcc
unsigned int fourcc
Definition: raw.h:34
AV_PIX_FMT_GBRP14LE
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
Definition: pixfmt.h:282
AV_PIX_FMT_0RGB
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: pixfmt.h:262
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:79
AV_PIX_FMT_GBRAP10BE
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
Definition: pixfmt.h:313
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
AV_PIX_FMT_YUVA444P16LE
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: pixfmt.h:192
AV_PIX_FMT_VYU444
@ AV_PIX_FMT_VYU444
packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
Definition: pixfmt.h:446
AV_PIX_FMT_YUVA422P12BE
@ AV_PIX_FMT_YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
Definition: pixfmt.h:366
AV_PIX_FMT_BGR444LE
@ AV_PIX_FMT_BGR444LE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:138
fourcc
uint32_t fourcc
Definition: vaapi_decode.c:263
AV_PIX_FMT_YUV422P12LE
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:272
AV_PIX_FMT_YUVA420P9BE
@ AV_PIX_FMT_YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
Definition: pixfmt.h:175
AV_PIX_FMT_BAYER_GRBG8
@ AV_PIX_FMT_BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
Definition: pixfmt.h:288
AV_PIX_FMT_GBRAP14LE
@ AV_PIX_FMT_GBRAP14LE
planar GBR 4:4:4:4 56bpp, little-endian
Definition: pixfmt.h:433
AV_PIX_FMT_YUVA422P
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:173
AV_PIX_FMT_UYYVYY411
@ AV_PIX_FMT_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
Definition: pixfmt.h:89
AV_PIX_FMT_BGR48BE
@ AV_PIX_FMT_BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:145
AV_PIX_FMT_YUVA422P9LE
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
Definition: pixfmt.h:178