FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavutil/pixdesc.c
Date: 2024-02-16 17:37:06
Exec Total Coverage
Lines: 328 392 83.7%
Functions: 26 33 78.8%
Branches: 244 329 74.2%

Line Branch Exec Source
1 /*
2 * pixel format descriptor
3 * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
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 #include <stdio.h>
23 #include <string.h>
24
25 #include "avstring.h"
26 #include "common.h"
27 #include "pixfmt.h"
28 #include "pixdesc.h"
29 #include "intreadwrite.h"
30
31 760222 void av_read_image_line2(void *dst,
32 const uint8_t *data[4], const int linesize[4],
33 const AVPixFmtDescriptor *desc,
34 int x, int y, int c, int w,
35 int read_pal_component,
36 int dst_element_size)
37 {
38 760222 AVComponentDescriptor comp = desc->comp[c];
39 760222 int plane = comp.plane;
40 760222 int depth = comp.depth;
41 760222 unsigned mask = (1ULL << depth) - 1;
42 760222 int shift = comp.shift;
43 760222 int step = comp.step;
44 760222 int flags = desc->flags;
45 760222 uint16_t *dst16 = dst;
46 760222 uint32_t *dst32 = dst;
47
48
2/2
✓ Branch 0 taken 2891 times.
✓ Branch 1 taken 757331 times.
760222 if (flags & AV_PIX_FMT_FLAG_BITSTREAM) {
49
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 2888 times.
2891 if (depth == 10) {
50 // Assume all channels are packed into a 32bit value
51 3 const uint8_t *byte_p = data[plane] + y * linesize[plane];
52 3 const uint32_t *p = (uint32_t *)byte_p;
53
54
2/2
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 3 times.
9 while (w--) {
55 6 int val = AV_RB32(p);
56 6 val = (val >> comp.offset) & mask;
57
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
6 if (read_pal_component)
58 val = data[1][4*val + c];
59
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
6 if (dst_element_size == 4) *dst32++ = val;
60 6 else *dst16++ = val;
61 6 p++;
62 }
63 } else {
64 2888 int skip = x * step + comp.offset;
65 2888 const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
66 2888 int shift = 8 - depth - (skip & 7);
67
68
2/2
✓ Branch 0 taken 1013776 times.
✓ Branch 1 taken 2888 times.
1016664 while (w--) {
69 1013776 int val = (*p >> shift) & mask;
70
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1013776 times.
1013776 if (read_pal_component)
71 val = data[1][4*val + c];
72 1013776 shift -= step;
73 1013776 p -= shift >> 3;
74 1013776 shift &= 7;
75
2/2
✓ Branch 0 taken 1013760 times.
✓ Branch 1 taken 16 times.
1013776 if (dst_element_size == 4) *dst32++ = val;
76 16 else *dst16++ = val;
77 }
78 }
79 } else {
80 757331 const uint8_t *p = data[plane] + y * linesize[plane] +
81 757331 x * step + comp.offset;
82 757331 int is_8bit = shift + depth <= 8;
83 757331 int is_16bit= shift + depth <=16;
84
85
2/2
✓ Branch 0 taken 218324 times.
✓ Branch 1 taken 539007 times.
757331 if (is_8bit)
86 218324 p += !!(flags & AV_PIX_FMT_FLAG_BE);
87
88
2/2
✓ Branch 0 taken 241086022 times.
✓ Branch 1 taken 757331 times.
241843353 while (w--) {
89 unsigned val;
90
2/2
✓ Branch 0 taken 70266568 times.
✓ Branch 1 taken 170819454 times.
241086022 if (is_8bit) val = *p;
91
4/4
✓ Branch 0 taken 162709314 times.
✓ Branch 1 taken 8110140 times.
✓ Branch 2 taken 76285854 times.
✓ Branch 3 taken 86423460 times.
170819454 else if(is_16bit) val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p);
92
2/2
✓ Branch 0 taken 4055070 times.
✓ Branch 1 taken 4055070 times.
8110140 else val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB32(p) : AV_RL32(p);
93 241086022 val = (val >> shift) & mask;
94
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 241086022 times.
241086022 if (read_pal_component)
95 val = data[1][4 * val + c];
96 241086022 p += step;
97
2/2
✓ Branch 0 taken 241084800 times.
✓ Branch 1 taken 1222 times.
241086022 if (dst_element_size == 4) *dst32++ = val;
98 1222 else *dst16++ = val;
99 }
100 }
101 760222 }
102
103 622 void av_read_image_line(uint16_t *dst,
104 const uint8_t *data[4], const int linesize[4],
105 const AVPixFmtDescriptor *desc,
106 int x, int y, int c, int w,
107 int read_pal_component)
108 {
109 622 av_read_image_line2(dst, data, linesize, desc,x, y, c, w,
110 read_pal_component,
111 2);
112 622 }
113
114 762196 void av_write_image_line2(const void *src,
115 uint8_t *data[4], const int linesize[4],
116 const AVPixFmtDescriptor *desc,
117 int x, int y, int c, int w, int src_element_size)
118 {
119 762196 AVComponentDescriptor comp = desc->comp[c];
120 762196 int plane = comp.plane;
121 762196 int depth = comp.depth;
122 762196 int step = comp.step;
123 762196 int flags = desc->flags;
124 762196 const uint32_t *src32 = src;
125 762196 const uint16_t *src16 = src;
126
127
2/2
✓ Branch 0 taken 2924 times.
✓ Branch 1 taken 759272 times.
762196 if (flags & AV_PIX_FMT_FLAG_BITSTREAM) {
128
2/2
✓ Branch 0 taken 12 times.
✓ Branch 1 taken 2912 times.
2924 if (depth == 10) {
129 // Assume all channels are packed into a 32bit value
130 12 const uint8_t *byte_p = data[plane] + y * linesize[plane];
131 12 uint32_t *p = (uint32_t *)byte_p;
132 12 int offset = comp.offset;
133 12 uint32_t mask = ((1ULL << depth) - 1) << offset;
134
135
2/2
✓ Branch 0 taken 78 times.
✓ Branch 1 taken 12 times.
90 while (w--) {
136
2/2
✓ Branch 0 taken 72 times.
✓ Branch 1 taken 6 times.
78 uint16_t val = src_element_size == 4 ? *src32++ : *src16++;
137 78 AV_WB32(p, (AV_RB32(p) & ~mask) | (val << offset));
138 78 p++;
139 }
140 } else {
141 2912 int skip = x * step + comp.offset;
142 2912 uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
143 2912 int shift = 8 - depth - (skip & 7);
144
145
2/2
✓ Branch 0 taken 1013968 times.
✓ Branch 1 taken 2912 times.
1016880 while (w--) {
146
2/2
✓ Branch 0 taken 1013952 times.
✓ Branch 1 taken 16 times.
1013968 *p |= (src_element_size == 4 ? *src32++ : *src16++) << shift;
147 1013968 shift -= step;
148 1013968 p -= shift >> 3;
149 1013968 shift &= 7;
150 }
151 }
152 } else {
153 759272 int shift = comp.shift;
154 759272 uint8_t *p = data[plane] + y * linesize[plane] +
155 759272 x * step + comp.offset;
156
157
2/2
✓ Branch 0 taken 218924 times.
✓ Branch 1 taken 540348 times.
759272 if (shift + depth <= 8) {
158 218924 p += !!(flags & AV_PIX_FMT_FLAG_BE);
159
2/2
✓ Branch 0 taken 70267177 times.
✓ Branch 1 taken 218924 times.
70486101 while (w--) {
160
2/2
✓ Branch 0 taken 70266849 times.
✓ Branch 1 taken 328 times.
70267177 *p |= ((src_element_size == 4 ? *src32++ : *src16++) << shift);
161 70267177 p += step;
162 }
163 } else {
164
2/2
✓ Branch 0 taken 170820807 times.
✓ Branch 1 taken 540348 times.
171361155 while (w--) {
165
2/2
✓ Branch 0 taken 170819913 times.
✓ Branch 1 taken 894 times.
170820807 unsigned s = (src_element_size == 4 ? *src32++ : *src16++);
166
2/2
✓ Branch 0 taken 162710577 times.
✓ Branch 1 taken 8110230 times.
170820807 if (shift + depth <= 16) {
167
2/2
✓ Branch 0 taken 76286481 times.
✓ Branch 1 taken 86424096 times.
162710577 if (flags & AV_PIX_FMT_FLAG_BE) {
168 76286481 uint16_t val = AV_RB16(p) | (s << shift);
169 76286481 AV_WB16(p, val);
170 } else {
171 86424096 uint16_t val = AV_RL16(p) | (s << shift);
172 86424096 AV_WL16(p, val);
173 }
174 } else {
175
2/2
✓ Branch 0 taken 4055115 times.
✓ Branch 1 taken 4055115 times.
8110230 if (flags & AV_PIX_FMT_FLAG_BE) {
176 4055115 uint32_t val = AV_RB32(p) | (s << shift);
177 4055115 AV_WB32(p, val);
178 } else {
179 4055115 uint32_t val = AV_RL32(p) | (s << shift);
180 4055115 AV_WL32(p, val);
181 }
182 }
183 170820807 p += step;
184 }
185 }
186 }
187 762196 }
188
189 622 void av_write_image_line(const uint16_t *src,
190 uint8_t *data[4], const int linesize[4],
191 const AVPixFmtDescriptor *desc,
192 int x, int y, int c, int w)
193 {
194 622 av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2);
195 622 }
196
197 static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
198 [AV_PIX_FMT_YUV420P] = {
199 .name = "yuv420p",
200 .nb_components = 3,
201 .log2_chroma_w = 1,
202 .log2_chroma_h = 1,
203 .comp = {
204 { 0, 1, 0, 0, 8 }, /* Y */
205 { 1, 1, 0, 0, 8 }, /* U */
206 { 2, 1, 0, 0, 8 }, /* V */
207 },
208 .flags = AV_PIX_FMT_FLAG_PLANAR,
209 },
210 [AV_PIX_FMT_YUYV422] = {
211 .name = "yuyv422",
212 .nb_components = 3,
213 .log2_chroma_w = 1,
214 .log2_chroma_h = 0,
215 .comp = {
216 { 0, 2, 0, 0, 8 }, /* Y */
217 { 0, 4, 1, 0, 8 }, /* U */
218 { 0, 4, 3, 0, 8 }, /* V */
219 },
220 },
221 [AV_PIX_FMT_YVYU422] = {
222 .name = "yvyu422",
223 .nb_components = 3,
224 .log2_chroma_w = 1,
225 .log2_chroma_h = 0,
226 .comp = {
227 { 0, 2, 0, 0, 8 }, /* Y */
228 { 0, 4, 3, 0, 8 }, /* U */
229 { 0, 4, 1, 0, 8 }, /* V */
230 },
231 },
232 [AV_PIX_FMT_Y210LE] = {
233 .name = "y210le",
234 .nb_components = 3,
235 .log2_chroma_w = 1,
236 .log2_chroma_h = 0,
237 .comp = {
238 { 0, 4, 0, 6, 10 }, /* Y */
239 { 0, 8, 2, 6, 10 }, /* U */
240 { 0, 8, 6, 6, 10 }, /* V */
241 },
242 },
243 [AV_PIX_FMT_Y210BE] = {
244 .name = "y210be",
245 .nb_components = 3,
246 .log2_chroma_w = 1,
247 .log2_chroma_h = 0,
248 .comp = {
249 { 0, 4, 0, 6, 10 }, /* Y */
250 { 0, 8, 2, 6, 10 }, /* U */
251 { 0, 8, 6, 6, 10 }, /* V */
252 },
253 .flags = AV_PIX_FMT_FLAG_BE,
254 },
255 [AV_PIX_FMT_RGB24] = {
256 .name = "rgb24",
257 .nb_components = 3,
258 .log2_chroma_w = 0,
259 .log2_chroma_h = 0,
260 .comp = {
261 { 0, 3, 0, 0, 8 }, /* R */
262 { 0, 3, 1, 0, 8 }, /* G */
263 { 0, 3, 2, 0, 8 }, /* B */
264 },
265 .flags = AV_PIX_FMT_FLAG_RGB,
266 },
267 [AV_PIX_FMT_BGR24] = {
268 .name = "bgr24",
269 .nb_components = 3,
270 .log2_chroma_w = 0,
271 .log2_chroma_h = 0,
272 .comp = {
273 { 0, 3, 2, 0, 8 }, /* R */
274 { 0, 3, 1, 0, 8 }, /* G */
275 { 0, 3, 0, 0, 8 }, /* B */
276 },
277 .flags = AV_PIX_FMT_FLAG_RGB,
278 },
279 [AV_PIX_FMT_X2RGB10LE] = {
280 .name = "x2rgb10le",
281 .nb_components= 3,
282 .log2_chroma_w= 0,
283 .log2_chroma_h= 0,
284 .comp = {
285 { 0, 4, 2, 4, 10 }, /* R */
286 { 0, 4, 1, 2, 10 }, /* G */
287 { 0, 4, 0, 0, 10 }, /* B */
288 },
289 .flags = AV_PIX_FMT_FLAG_RGB,
290 },
291 [AV_PIX_FMT_X2RGB10BE] = {
292 .name = "x2rgb10be",
293 .nb_components= 3,
294 .log2_chroma_w= 0,
295 .log2_chroma_h= 0,
296 .comp = {
297 { 0, 4, 0, 4, 10 }, /* R */
298 { 0, 4, 1, 2, 10 }, /* G */
299 { 0, 4, 2, 0, 10 }, /* B */
300 },
301 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
302 },
303 [AV_PIX_FMT_X2BGR10LE] = {
304 .name = "x2bgr10le",
305 .nb_components= 3,
306 .log2_chroma_w= 0,
307 .log2_chroma_h= 0,
308 .comp = {
309 { 0, 4, 0, 0, 10 }, /* R */
310 { 0, 4, 1, 2, 10 }, /* G */
311 { 0, 4, 2, 4, 10 }, /* B */
312 },
313 .flags = AV_PIX_FMT_FLAG_RGB,
314 },
315 [AV_PIX_FMT_X2BGR10BE] = {
316 .name = "x2bgr10be",
317 .nb_components= 3,
318 .log2_chroma_w= 0,
319 .log2_chroma_h= 0,
320 .comp = {
321 { 0, 4, 2, 0, 10 }, /* R */
322 { 0, 4, 1, 2, 10 }, /* G */
323 { 0, 4, 0, 4, 10 }, /* B */
324 },
325 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
326 },
327 [AV_PIX_FMT_YUV422P] = {
328 .name = "yuv422p",
329 .nb_components = 3,
330 .log2_chroma_w = 1,
331 .log2_chroma_h = 0,
332 .comp = {
333 { 0, 1, 0, 0, 8 }, /* Y */
334 { 1, 1, 0, 0, 8 }, /* U */
335 { 2, 1, 0, 0, 8 }, /* V */
336 },
337 .flags = AV_PIX_FMT_FLAG_PLANAR,
338 },
339 [AV_PIX_FMT_YUV444P] = {
340 .name = "yuv444p",
341 .nb_components = 3,
342 .log2_chroma_w = 0,
343 .log2_chroma_h = 0,
344 .comp = {
345 { 0, 1, 0, 0, 8 }, /* Y */
346 { 1, 1, 0, 0, 8 }, /* U */
347 { 2, 1, 0, 0, 8 }, /* V */
348 },
349 .flags = AV_PIX_FMT_FLAG_PLANAR,
350 },
351 [AV_PIX_FMT_YUV410P] = {
352 .name = "yuv410p",
353 .nb_components = 3,
354 .log2_chroma_w = 2,
355 .log2_chroma_h = 2,
356 .comp = {
357 { 0, 1, 0, 0, 8 }, /* Y */
358 { 1, 1, 0, 0, 8 }, /* U */
359 { 2, 1, 0, 0, 8 }, /* V */
360 },
361 .flags = AV_PIX_FMT_FLAG_PLANAR,
362 },
363 [AV_PIX_FMT_YUV411P] = {
364 .name = "yuv411p",
365 .nb_components = 3,
366 .log2_chroma_w = 2,
367 .log2_chroma_h = 0,
368 .comp = {
369 { 0, 1, 0, 0, 8 }, /* Y */
370 { 1, 1, 0, 0, 8 }, /* U */
371 { 2, 1, 0, 0, 8 }, /* V */
372 },
373 .flags = AV_PIX_FMT_FLAG_PLANAR,
374 },
375 [AV_PIX_FMT_YUVJ411P] = {
376 .name = "yuvj411p",
377 .nb_components = 3,
378 .log2_chroma_w = 2,
379 .log2_chroma_h = 0,
380 .comp = {
381 { 0, 1, 0, 0, 8 }, /* Y */
382 { 1, 1, 0, 0, 8 }, /* U */
383 { 2, 1, 0, 0, 8 }, /* V */
384 },
385 .flags = AV_PIX_FMT_FLAG_PLANAR,
386 },
387 [AV_PIX_FMT_GRAY8] = {
388 .name = "gray",
389 .nb_components = 1,
390 .log2_chroma_w = 0,
391 .log2_chroma_h = 0,
392 .comp = {
393 { 0, 1, 0, 0, 8 }, /* Y */
394 },
395 .alias = "gray8,y8",
396 },
397 [AV_PIX_FMT_MONOWHITE] = {
398 .name = "monow",
399 .nb_components = 1,
400 .log2_chroma_w = 0,
401 .log2_chroma_h = 0,
402 .comp = {
403 { 0, 1, 0, 0, 1 }, /* Y */
404 },
405 .flags = AV_PIX_FMT_FLAG_BITSTREAM,
406 },
407 [AV_PIX_FMT_MONOBLACK] = {
408 .name = "monob",
409 .nb_components = 1,
410 .log2_chroma_w = 0,
411 .log2_chroma_h = 0,
412 .comp = {
413 { 0, 1, 0, 7, 1 }, /* Y */
414 },
415 .flags = AV_PIX_FMT_FLAG_BITSTREAM,
416 },
417 [AV_PIX_FMT_PAL8] = {
418 .name = "pal8",
419 .nb_components = 1,
420 .log2_chroma_w = 0,
421 .log2_chroma_h = 0,
422 .comp = {
423 { 0, 1, 0, 0, 8 },
424 },
425 .flags = AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_ALPHA,
426 },
427 [AV_PIX_FMT_YUVJ420P] = {
428 .name = "yuvj420p",
429 .nb_components = 3,
430 .log2_chroma_w = 1,
431 .log2_chroma_h = 1,
432 .comp = {
433 { 0, 1, 0, 0, 8 }, /* Y */
434 { 1, 1, 0, 0, 8 }, /* U */
435 { 2, 1, 0, 0, 8 }, /* V */
436 },
437 .flags = AV_PIX_FMT_FLAG_PLANAR,
438 },
439 [AV_PIX_FMT_YUVJ422P] = {
440 .name = "yuvj422p",
441 .nb_components = 3,
442 .log2_chroma_w = 1,
443 .log2_chroma_h = 0,
444 .comp = {
445 { 0, 1, 0, 0, 8 }, /* Y */
446 { 1, 1, 0, 0, 8 }, /* U */
447 { 2, 1, 0, 0, 8 }, /* V */
448 },
449 .flags = AV_PIX_FMT_FLAG_PLANAR,
450 },
451 [AV_PIX_FMT_YUVJ444P] = {
452 .name = "yuvj444p",
453 .nb_components = 3,
454 .log2_chroma_w = 0,
455 .log2_chroma_h = 0,
456 .comp = {
457 { 0, 1, 0, 0, 8 }, /* Y */
458 { 1, 1, 0, 0, 8 }, /* U */
459 { 2, 1, 0, 0, 8 }, /* V */
460 },
461 .flags = AV_PIX_FMT_FLAG_PLANAR,
462 },
463 #if FF_API_XVMC
464 [AV_PIX_FMT_XVMC] = {
465 .name = "xvmc",
466 .flags = AV_PIX_FMT_FLAG_HWACCEL,
467 },
468 #endif
469 [AV_PIX_FMT_UYVY422] = {
470 .name = "uyvy422",
471 .nb_components = 3,
472 .log2_chroma_w = 1,
473 .log2_chroma_h = 0,
474 .comp = {
475 { 0, 2, 1, 0, 8 }, /* Y */
476 { 0, 4, 0, 0, 8 }, /* U */
477 { 0, 4, 2, 0, 8 }, /* V */
478 },
479 },
480 [AV_PIX_FMT_UYYVYY411] = {
481 .name = "uyyvyy411",
482 .nb_components = 3,
483 .log2_chroma_w = 2,
484 .log2_chroma_h = 0,
485 .comp = {
486 { 0, 4, 1, 0, 8 }, /* Y */
487 { 0, 6, 0, 0, 8 }, /* U */
488 { 0, 6, 3, 0, 8 }, /* V */
489 },
490 },
491 [AV_PIX_FMT_BGR8] = {
492 .name = "bgr8",
493 .nb_components = 3,
494 .log2_chroma_w = 0,
495 .log2_chroma_h = 0,
496 .comp = {
497 { 0, 1, 0, 0, 3 }, /* R */
498 { 0, 1, 0, 3, 3 }, /* G */
499 { 0, 1, 0, 6, 2 }, /* B */
500 },
501 .flags = AV_PIX_FMT_FLAG_RGB,
502 },
503 [AV_PIX_FMT_BGR4] = {
504 .name = "bgr4",
505 .nb_components = 3,
506 .log2_chroma_w = 0,
507 .log2_chroma_h = 0,
508 .comp = {
509 { 0, 4, 3, 0, 1 }, /* R */
510 { 0, 4, 1, 0, 2 }, /* G */
511 { 0, 4, 0, 0, 1 }, /* B */
512 },
513 .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
514 },
515 [AV_PIX_FMT_BGR4_BYTE] = {
516 .name = "bgr4_byte",
517 .nb_components = 3,
518 .log2_chroma_w = 0,
519 .log2_chroma_h = 0,
520 .comp = {
521 { 0, 1, 0, 0, 1 }, /* R */
522 { 0, 1, 0, 1, 2 }, /* G */
523 { 0, 1, 0, 3, 1 }, /* B */
524 },
525 .flags = AV_PIX_FMT_FLAG_RGB,
526 },
527 [AV_PIX_FMT_RGB8] = {
528 .name = "rgb8",
529 .nb_components = 3,
530 .log2_chroma_w = 0,
531 .log2_chroma_h = 0,
532 .comp = {
533 { 0, 1, 0, 5, 3 }, /* R */
534 { 0, 1, 0, 2, 3 }, /* G */
535 { 0, 1, 0, 0, 2 }, /* B */
536 },
537 .flags = AV_PIX_FMT_FLAG_RGB,
538 },
539 [AV_PIX_FMT_RGB4] = {
540 .name = "rgb4",
541 .nb_components = 3,
542 .log2_chroma_w = 0,
543 .log2_chroma_h = 0,
544 .comp = {
545 { 0, 4, 0, 0, 1 }, /* R */
546 { 0, 4, 1, 0, 2 }, /* G */
547 { 0, 4, 3, 0, 1 }, /* B */
548 },
549 .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
550 },
551 [AV_PIX_FMT_RGB4_BYTE] = {
552 .name = "rgb4_byte",
553 .nb_components = 3,
554 .log2_chroma_w = 0,
555 .log2_chroma_h = 0,
556 .comp = {
557 { 0, 1, 0, 3, 1 }, /* R */
558 { 0, 1, 0, 1, 2 }, /* G */
559 { 0, 1, 0, 0, 1 }, /* B */
560 },
561 .flags = AV_PIX_FMT_FLAG_RGB,
562 },
563 [AV_PIX_FMT_NV12] = {
564 .name = "nv12",
565 .nb_components = 3,
566 .log2_chroma_w = 1,
567 .log2_chroma_h = 1,
568 .comp = {
569 { 0, 1, 0, 0, 8 }, /* Y */
570 { 1, 2, 0, 0, 8 }, /* U */
571 { 1, 2, 1, 0, 8 }, /* V */
572 },
573 .flags = AV_PIX_FMT_FLAG_PLANAR,
574 },
575 [AV_PIX_FMT_NV21] = {
576 .name = "nv21",
577 .nb_components = 3,
578 .log2_chroma_w = 1,
579 .log2_chroma_h = 1,
580 .comp = {
581 { 0, 1, 0, 0, 8 }, /* Y */
582 { 1, 2, 1, 0, 8 }, /* U */
583 { 1, 2, 0, 0, 8 }, /* V */
584 },
585 .flags = AV_PIX_FMT_FLAG_PLANAR,
586 },
587 [AV_PIX_FMT_ARGB] = {
588 .name = "argb",
589 .nb_components = 4,
590 .log2_chroma_w = 0,
591 .log2_chroma_h = 0,
592 .comp = {
593 { 0, 4, 1, 0, 8 }, /* R */
594 { 0, 4, 2, 0, 8 }, /* G */
595 { 0, 4, 3, 0, 8 }, /* B */
596 { 0, 4, 0, 0, 8 }, /* A */
597 },
598 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
599 },
600 [AV_PIX_FMT_RGBA] = {
601 .name = "rgba",
602 .nb_components = 4,
603 .log2_chroma_w = 0,
604 .log2_chroma_h = 0,
605 .comp = {
606 { 0, 4, 0, 0, 8 }, /* R */
607 { 0, 4, 1, 0, 8 }, /* G */
608 { 0, 4, 2, 0, 8 }, /* B */
609 { 0, 4, 3, 0, 8 }, /* A */
610 },
611 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
612 },
613 [AV_PIX_FMT_ABGR] = {
614 .name = "abgr",
615 .nb_components = 4,
616 .log2_chroma_w = 0,
617 .log2_chroma_h = 0,
618 .comp = {
619 { 0, 4, 3, 0, 8 }, /* R */
620 { 0, 4, 2, 0, 8 }, /* G */
621 { 0, 4, 1, 0, 8 }, /* B */
622 { 0, 4, 0, 0, 8 }, /* A */
623 },
624 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
625 },
626 [AV_PIX_FMT_BGRA] = {
627 .name = "bgra",
628 .nb_components = 4,
629 .log2_chroma_w = 0,
630 .log2_chroma_h = 0,
631 .comp = {
632 { 0, 4, 2, 0, 8 }, /* R */
633 { 0, 4, 1, 0, 8 }, /* G */
634 { 0, 4, 0, 0, 8 }, /* B */
635 { 0, 4, 3, 0, 8 }, /* A */
636 },
637 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
638 },
639 [AV_PIX_FMT_0RGB] = {
640 .name = "0rgb",
641 .nb_components= 3,
642 .log2_chroma_w= 0,
643 .log2_chroma_h= 0,
644 .comp = {
645 { 0, 4, 1, 0, 8 }, /* R */
646 { 0, 4, 2, 0, 8 }, /* G */
647 { 0, 4, 3, 0, 8 }, /* B */
648 },
649 .flags = AV_PIX_FMT_FLAG_RGB,
650 },
651 [AV_PIX_FMT_RGB0] = {
652 .name = "rgb0",
653 .nb_components= 3,
654 .log2_chroma_w= 0,
655 .log2_chroma_h= 0,
656 .comp = {
657 { 0, 4, 0, 0, 8 }, /* R */
658 { 0, 4, 1, 0, 8 }, /* G */
659 { 0, 4, 2, 0, 8 }, /* B */
660 },
661 .flags = AV_PIX_FMT_FLAG_RGB,
662 },
663 [AV_PIX_FMT_0BGR] = {
664 .name = "0bgr",
665 .nb_components= 3,
666 .log2_chroma_w= 0,
667 .log2_chroma_h= 0,
668 .comp = {
669 { 0, 4, 3, 0, 8 }, /* R */
670 { 0, 4, 2, 0, 8 }, /* G */
671 { 0, 4, 1, 0, 8 }, /* B */
672 },
673 .flags = AV_PIX_FMT_FLAG_RGB,
674 },
675 [AV_PIX_FMT_BGR0] = {
676 .name = "bgr0",
677 .nb_components= 3,
678 .log2_chroma_w= 0,
679 .log2_chroma_h= 0,
680 .comp = {
681 { 0, 4, 2, 0, 8 }, /* R */
682 { 0, 4, 1, 0, 8 }, /* G */
683 { 0, 4, 0, 0, 8 }, /* B */
684 },
685 .flags = AV_PIX_FMT_FLAG_RGB,
686 },
687 [AV_PIX_FMT_GRAY9BE] = {
688 .name = "gray9be",
689 .nb_components = 1,
690 .log2_chroma_w = 0,
691 .log2_chroma_h = 0,
692 .comp = {
693 { 0, 2, 0, 0, 9 }, /* Y */
694 },
695 .flags = AV_PIX_FMT_FLAG_BE,
696 .alias = "y9be",
697 },
698 [AV_PIX_FMT_GRAY9LE] = {
699 .name = "gray9le",
700 .nb_components = 1,
701 .log2_chroma_w = 0,
702 .log2_chroma_h = 0,
703 .comp = {
704 { 0, 2, 0, 0, 9 }, /* Y */
705 },
706 .alias = "y9le",
707 },
708 [AV_PIX_FMT_GRAY10BE] = {
709 .name = "gray10be",
710 .nb_components = 1,
711 .log2_chroma_w = 0,
712 .log2_chroma_h = 0,
713 .comp = {
714 { 0, 2, 0, 0, 10 }, /* Y */
715 },
716 .flags = AV_PIX_FMT_FLAG_BE,
717 .alias = "y10be",
718 },
719 [AV_PIX_FMT_GRAY10LE] = {
720 .name = "gray10le",
721 .nb_components = 1,
722 .log2_chroma_w = 0,
723 .log2_chroma_h = 0,
724 .comp = {
725 { 0, 2, 0, 0, 10 }, /* Y */
726 },
727 .alias = "y10le",
728 },
729 [AV_PIX_FMT_GRAY12BE] = {
730 .name = "gray12be",
731 .nb_components = 1,
732 .log2_chroma_w = 0,
733 .log2_chroma_h = 0,
734 .comp = {
735 { 0, 2, 0, 0, 12 }, /* Y */
736 },
737 .flags = AV_PIX_FMT_FLAG_BE,
738 .alias = "y12be",
739 },
740 [AV_PIX_FMT_GRAY12LE] = {
741 .name = "gray12le",
742 .nb_components = 1,
743 .log2_chroma_w = 0,
744 .log2_chroma_h = 0,
745 .comp = {
746 { 0, 2, 0, 0, 12 }, /* Y */
747 },
748 .alias = "y12le",
749 },
750 [AV_PIX_FMT_GRAY14BE] = {
751 .name = "gray14be",
752 .nb_components = 1,
753 .log2_chroma_w = 0,
754 .log2_chroma_h = 0,
755 .comp = {
756 { 0, 2, 0, 0, 14 }, /* Y */
757 },
758 .flags = AV_PIX_FMT_FLAG_BE,
759 .alias = "y14be",
760 },
761 [AV_PIX_FMT_GRAY14LE] = {
762 .name = "gray14le",
763 .nb_components = 1,
764 .log2_chroma_w = 0,
765 .log2_chroma_h = 0,
766 .comp = {
767 { 0, 2, 0, 0, 14 }, /* Y */
768 },
769 .alias = "y14le",
770 },
771 [AV_PIX_FMT_GRAY16BE] = {
772 .name = "gray16be",
773 .nb_components = 1,
774 .log2_chroma_w = 0,
775 .log2_chroma_h = 0,
776 .comp = {
777 { 0, 2, 0, 0, 16 }, /* Y */
778 },
779 .flags = AV_PIX_FMT_FLAG_BE,
780 .alias = "y16be",
781 },
782 [AV_PIX_FMT_GRAY16LE] = {
783 .name = "gray16le",
784 .nb_components = 1,
785 .log2_chroma_w = 0,
786 .log2_chroma_h = 0,
787 .comp = {
788 { 0, 2, 0, 0, 16 }, /* Y */
789 },
790 .alias = "y16le",
791 },
792 [AV_PIX_FMT_YUV440P] = {
793 .name = "yuv440p",
794 .nb_components = 3,
795 .log2_chroma_w = 0,
796 .log2_chroma_h = 1,
797 .comp = {
798 { 0, 1, 0, 0, 8 }, /* Y */
799 { 1, 1, 0, 0, 8 }, /* U */
800 { 2, 1, 0, 0, 8 }, /* V */
801 },
802 .flags = AV_PIX_FMT_FLAG_PLANAR,
803 },
804 [AV_PIX_FMT_YUVJ440P] = {
805 .name = "yuvj440p",
806 .nb_components = 3,
807 .log2_chroma_w = 0,
808 .log2_chroma_h = 1,
809 .comp = {
810 { 0, 1, 0, 0, 8 }, /* Y */
811 { 1, 1, 0, 0, 8 }, /* U */
812 { 2, 1, 0, 0, 8 }, /* V */
813 },
814 .flags = AV_PIX_FMT_FLAG_PLANAR,
815 },
816 [AV_PIX_FMT_YUV440P10LE] = {
817 .name = "yuv440p10le",
818 .nb_components = 3,
819 .log2_chroma_w = 0,
820 .log2_chroma_h = 1,
821 .comp = {
822 { 0, 2, 0, 0, 10 }, /* Y */
823 { 1, 2, 0, 0, 10 }, /* U */
824 { 2, 2, 0, 0, 10 }, /* V */
825 },
826 .flags = AV_PIX_FMT_FLAG_PLANAR,
827 },
828 [AV_PIX_FMT_YUV440P10BE] = {
829 .name = "yuv440p10be",
830 .nb_components = 3,
831 .log2_chroma_w = 0,
832 .log2_chroma_h = 1,
833 .comp = {
834 { 0, 2, 0, 0, 10 }, /* Y */
835 { 1, 2, 0, 0, 10 }, /* U */
836 { 2, 2, 0, 0, 10 }, /* V */
837 },
838 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
839 },
840 [AV_PIX_FMT_YUV440P12LE] = {
841 .name = "yuv440p12le",
842 .nb_components = 3,
843 .log2_chroma_w = 0,
844 .log2_chroma_h = 1,
845 .comp = {
846 { 0, 2, 0, 0, 12 }, /* Y */
847 { 1, 2, 0, 0, 12 }, /* U */
848 { 2, 2, 0, 0, 12 }, /* V */
849 },
850 .flags = AV_PIX_FMT_FLAG_PLANAR,
851 },
852 [AV_PIX_FMT_YUV440P12BE] = {
853 .name = "yuv440p12be",
854 .nb_components = 3,
855 .log2_chroma_w = 0,
856 .log2_chroma_h = 1,
857 .comp = {
858 { 0, 2, 0, 0, 12 }, /* Y */
859 { 1, 2, 0, 0, 12 }, /* U */
860 { 2, 2, 0, 0, 12 }, /* V */
861 },
862 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
863 },
864 [AV_PIX_FMT_YUVA420P] = {
865 .name = "yuva420p",
866 .nb_components = 4,
867 .log2_chroma_w = 1,
868 .log2_chroma_h = 1,
869 .comp = {
870 { 0, 1, 0, 0, 8 }, /* Y */
871 { 1, 1, 0, 0, 8 }, /* U */
872 { 2, 1, 0, 0, 8 }, /* V */
873 { 3, 1, 0, 0, 8 }, /* A */
874 },
875 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
876 },
877 [AV_PIX_FMT_YUVA422P] = {
878 .name = "yuva422p",
879 .nb_components = 4,
880 .log2_chroma_w = 1,
881 .log2_chroma_h = 0,
882 .comp = {
883 { 0, 1, 0, 0, 8 }, /* Y */
884 { 1, 1, 0, 0, 8 }, /* U */
885 { 2, 1, 0, 0, 8 }, /* V */
886 { 3, 1, 0, 0, 8 }, /* A */
887 },
888 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
889 },
890 [AV_PIX_FMT_YUVA444P] = {
891 .name = "yuva444p",
892 .nb_components = 4,
893 .log2_chroma_w = 0,
894 .log2_chroma_h = 0,
895 .comp = {
896 { 0, 1, 0, 0, 8 }, /* Y */
897 { 1, 1, 0, 0, 8 }, /* U */
898 { 2, 1, 0, 0, 8 }, /* V */
899 { 3, 1, 0, 0, 8 }, /* A */
900 },
901 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
902 },
903 [AV_PIX_FMT_YUVA420P9BE] = {
904 .name = "yuva420p9be",
905 .nb_components = 4,
906 .log2_chroma_w = 1,
907 .log2_chroma_h = 1,
908 .comp = {
909 { 0, 2, 0, 0, 9 }, /* Y */
910 { 1, 2, 0, 0, 9 }, /* U */
911 { 2, 2, 0, 0, 9 }, /* V */
912 { 3, 2, 0, 0, 9 }, /* A */
913 },
914 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
915 },
916 [AV_PIX_FMT_YUVA420P9LE] = {
917 .name = "yuva420p9le",
918 .nb_components = 4,
919 .log2_chroma_w = 1,
920 .log2_chroma_h = 1,
921 .comp = {
922 { 0, 2, 0, 0, 9 }, /* Y */
923 { 1, 2, 0, 0, 9 }, /* U */
924 { 2, 2, 0, 0, 9 }, /* V */
925 { 3, 2, 0, 0, 9 }, /* A */
926 },
927 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
928 },
929 [AV_PIX_FMT_YUVA422P9BE] = {
930 .name = "yuva422p9be",
931 .nb_components = 4,
932 .log2_chroma_w = 1,
933 .log2_chroma_h = 0,
934 .comp = {
935 { 0, 2, 0, 0, 9 }, /* Y */
936 { 1, 2, 0, 0, 9 }, /* U */
937 { 2, 2, 0, 0, 9 }, /* V */
938 { 3, 2, 0, 0, 9 }, /* A */
939 },
940 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
941 },
942 [AV_PIX_FMT_YUVA422P9LE] = {
943 .name = "yuva422p9le",
944 .nb_components = 4,
945 .log2_chroma_w = 1,
946 .log2_chroma_h = 0,
947 .comp = {
948 { 0, 2, 0, 0, 9 }, /* Y */
949 { 1, 2, 0, 0, 9 }, /* U */
950 { 2, 2, 0, 0, 9 }, /* V */
951 { 3, 2, 0, 0, 9 }, /* A */
952 },
953 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
954 },
955 [AV_PIX_FMT_YUVA444P9BE] = {
956 .name = "yuva444p9be",
957 .nb_components = 4,
958 .log2_chroma_w = 0,
959 .log2_chroma_h = 0,
960 .comp = {
961 { 0, 2, 0, 0, 9 }, /* Y */
962 { 1, 2, 0, 0, 9 }, /* U */
963 { 2, 2, 0, 0, 9 }, /* V */
964 { 3, 2, 0, 0, 9 }, /* A */
965 },
966 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
967 },
968 [AV_PIX_FMT_YUVA444P9LE] = {
969 .name = "yuva444p9le",
970 .nb_components = 4,
971 .log2_chroma_w = 0,
972 .log2_chroma_h = 0,
973 .comp = {
974 { 0, 2, 0, 0, 9 }, /* Y */
975 { 1, 2, 0, 0, 9 }, /* U */
976 { 2, 2, 0, 0, 9 }, /* V */
977 { 3, 2, 0, 0, 9 }, /* A */
978 },
979 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
980 },
981 [AV_PIX_FMT_YUVA420P10BE] = {
982 .name = "yuva420p10be",
983 .nb_components = 4,
984 .log2_chroma_w = 1,
985 .log2_chroma_h = 1,
986 .comp = {
987 { 0, 2, 0, 0, 10 }, /* Y */
988 { 1, 2, 0, 0, 10 }, /* U */
989 { 2, 2, 0, 0, 10 }, /* V */
990 { 3, 2, 0, 0, 10 }, /* A */
991 },
992 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
993 },
994 [AV_PIX_FMT_YUVA420P10LE] = {
995 .name = "yuva420p10le",
996 .nb_components = 4,
997 .log2_chroma_w = 1,
998 .log2_chroma_h = 1,
999 .comp = {
1000 { 0, 2, 0, 0, 10 }, /* Y */
1001 { 1, 2, 0, 0, 10 }, /* U */
1002 { 2, 2, 0, 0, 10 }, /* V */
1003 { 3, 2, 0, 0, 10 }, /* A */
1004 },
1005 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1006 },
1007 [AV_PIX_FMT_YUVA422P10BE] = {
1008 .name = "yuva422p10be",
1009 .nb_components = 4,
1010 .log2_chroma_w = 1,
1011 .log2_chroma_h = 0,
1012 .comp = {
1013 { 0, 2, 0, 0, 10 }, /* Y */
1014 { 1, 2, 0, 0, 10 }, /* U */
1015 { 2, 2, 0, 0, 10 }, /* V */
1016 { 3, 2, 0, 0, 10 }, /* A */
1017 },
1018 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1019 },
1020 [AV_PIX_FMT_YUVA422P10LE] = {
1021 .name = "yuva422p10le",
1022 .nb_components = 4,
1023 .log2_chroma_w = 1,
1024 .log2_chroma_h = 0,
1025 .comp = {
1026 { 0, 2, 0, 0, 10 }, /* Y */
1027 { 1, 2, 0, 0, 10 }, /* U */
1028 { 2, 2, 0, 0, 10 }, /* V */
1029 { 3, 2, 0, 0, 10 }, /* A */
1030 },
1031 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1032 },
1033 [AV_PIX_FMT_YUVA444P10BE] = {
1034 .name = "yuva444p10be",
1035 .nb_components = 4,
1036 .log2_chroma_w = 0,
1037 .log2_chroma_h = 0,
1038 .comp = {
1039 { 0, 2, 0, 0, 10 }, /* Y */
1040 { 1, 2, 0, 0, 10 }, /* U */
1041 { 2, 2, 0, 0, 10 }, /* V */
1042 { 3, 2, 0, 0, 10 }, /* A */
1043 },
1044 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1045 },
1046 [AV_PIX_FMT_YUVA444P10LE] = {
1047 .name = "yuva444p10le",
1048 .nb_components = 4,
1049 .log2_chroma_w = 0,
1050 .log2_chroma_h = 0,
1051 .comp = {
1052 { 0, 2, 0, 0, 10 }, /* Y */
1053 { 1, 2, 0, 0, 10 }, /* U */
1054 { 2, 2, 0, 0, 10 }, /* V */
1055 { 3, 2, 0, 0, 10 }, /* A */
1056 },
1057 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1058 },
1059 [AV_PIX_FMT_YUVA420P16BE] = {
1060 .name = "yuva420p16be",
1061 .nb_components = 4,
1062 .log2_chroma_w = 1,
1063 .log2_chroma_h = 1,
1064 .comp = {
1065 { 0, 2, 0, 0, 16 }, /* Y */
1066 { 1, 2, 0, 0, 16 }, /* U */
1067 { 2, 2, 0, 0, 16 }, /* V */
1068 { 3, 2, 0, 0, 16 }, /* A */
1069 },
1070 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1071 },
1072 [AV_PIX_FMT_YUVA420P16LE] = {
1073 .name = "yuva420p16le",
1074 .nb_components = 4,
1075 .log2_chroma_w = 1,
1076 .log2_chroma_h = 1,
1077 .comp = {
1078 { 0, 2, 0, 0, 16 }, /* Y */
1079 { 1, 2, 0, 0, 16 }, /* U */
1080 { 2, 2, 0, 0, 16 }, /* V */
1081 { 3, 2, 0, 0, 16 }, /* A */
1082 },
1083 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1084 },
1085 [AV_PIX_FMT_YUVA422P16BE] = {
1086 .name = "yuva422p16be",
1087 .nb_components = 4,
1088 .log2_chroma_w = 1,
1089 .log2_chroma_h = 0,
1090 .comp = {
1091 { 0, 2, 0, 0, 16 }, /* Y */
1092 { 1, 2, 0, 0, 16 }, /* U */
1093 { 2, 2, 0, 0, 16 }, /* V */
1094 { 3, 2, 0, 0, 16 }, /* A */
1095 },
1096 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1097 },
1098 [AV_PIX_FMT_YUVA422P16LE] = {
1099 .name = "yuva422p16le",
1100 .nb_components = 4,
1101 .log2_chroma_w = 1,
1102 .log2_chroma_h = 0,
1103 .comp = {
1104 { 0, 2, 0, 0, 16 }, /* Y */
1105 { 1, 2, 0, 0, 16 }, /* U */
1106 { 2, 2, 0, 0, 16 }, /* V */
1107 { 3, 2, 0, 0, 16 }, /* A */
1108 },
1109 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1110 },
1111 [AV_PIX_FMT_YUVA444P16BE] = {
1112 .name = "yuva444p16be",
1113 .nb_components = 4,
1114 .log2_chroma_w = 0,
1115 .log2_chroma_h = 0,
1116 .comp = {
1117 { 0, 2, 0, 0, 16 }, /* Y */
1118 { 1, 2, 0, 0, 16 }, /* U */
1119 { 2, 2, 0, 0, 16 }, /* V */
1120 { 3, 2, 0, 0, 16 }, /* A */
1121 },
1122 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1123 },
1124 [AV_PIX_FMT_YUVA444P16LE] = {
1125 .name = "yuva444p16le",
1126 .nb_components = 4,
1127 .log2_chroma_w = 0,
1128 .log2_chroma_h = 0,
1129 .comp = {
1130 { 0, 2, 0, 0, 16 }, /* Y */
1131 { 1, 2, 0, 0, 16 }, /* U */
1132 { 2, 2, 0, 0, 16 }, /* V */
1133 { 3, 2, 0, 0, 16 }, /* A */
1134 },
1135 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1136 },
1137 [AV_PIX_FMT_RGB48BE] = {
1138 .name = "rgb48be",
1139 .nb_components = 3,
1140 .log2_chroma_w = 0,
1141 .log2_chroma_h = 0,
1142 .comp = {
1143 { 0, 6, 0, 0, 16 }, /* R */
1144 { 0, 6, 2, 0, 16 }, /* G */
1145 { 0, 6, 4, 0, 16 }, /* B */
1146 },
1147 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
1148 },
1149 [AV_PIX_FMT_RGB48LE] = {
1150 .name = "rgb48le",
1151 .nb_components = 3,
1152 .log2_chroma_w = 0,
1153 .log2_chroma_h = 0,
1154 .comp = {
1155 { 0, 6, 0, 0, 16 }, /* R */
1156 { 0, 6, 2, 0, 16 }, /* G */
1157 { 0, 6, 4, 0, 16 }, /* B */
1158 },
1159 .flags = AV_PIX_FMT_FLAG_RGB,
1160 },
1161 [AV_PIX_FMT_RGBA64BE] = {
1162 .name = "rgba64be",
1163 .nb_components = 4,
1164 .log2_chroma_w = 0,
1165 .log2_chroma_h = 0,
1166 .comp = {
1167 { 0, 8, 0, 0, 16 }, /* R */
1168 { 0, 8, 2, 0, 16 }, /* G */
1169 { 0, 8, 4, 0, 16 }, /* B */
1170 { 0, 8, 6, 0, 16 }, /* A */
1171 },
1172 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1173 },
1174 [AV_PIX_FMT_RGBA64LE] = {
1175 .name = "rgba64le",
1176 .nb_components = 4,
1177 .log2_chroma_w = 0,
1178 .log2_chroma_h = 0,
1179 .comp = {
1180 { 0, 8, 0, 0, 16 }, /* R */
1181 { 0, 8, 2, 0, 16 }, /* G */
1182 { 0, 8, 4, 0, 16 }, /* B */
1183 { 0, 8, 6, 0, 16 }, /* A */
1184 },
1185 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1186 },
1187 [AV_PIX_FMT_RGB565BE] = {
1188 .name = "rgb565be",
1189 .nb_components = 3,
1190 .log2_chroma_w = 0,
1191 .log2_chroma_h = 0,
1192 .comp = {
1193 { 0, 2, -1, 3, 5 }, /* R */
1194 { 0, 2, 0, 5, 6 }, /* G */
1195 { 0, 2, 0, 0, 5 }, /* B */
1196 },
1197 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1198 },
1199 [AV_PIX_FMT_RGB565LE] = {
1200 .name = "rgb565le",
1201 .nb_components = 3,
1202 .log2_chroma_w = 0,
1203 .log2_chroma_h = 0,
1204 .comp = {
1205 { 0, 2, 1, 3, 5 }, /* R */
1206 { 0, 2, 0, 5, 6 }, /* G */
1207 { 0, 2, 0, 0, 5 }, /* B */
1208 },
1209 .flags = AV_PIX_FMT_FLAG_RGB,
1210 },
1211 [AV_PIX_FMT_RGB555BE] = {
1212 .name = "rgb555be",
1213 .nb_components = 3,
1214 .log2_chroma_w = 0,
1215 .log2_chroma_h = 0,
1216 .comp = {
1217 { 0, 2, -1, 2, 5 }, /* R */
1218 { 0, 2, 0, 5, 5 }, /* G */
1219 { 0, 2, 0, 0, 5 }, /* B */
1220 },
1221 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1222 },
1223 [AV_PIX_FMT_RGB555LE] = {
1224 .name = "rgb555le",
1225 .nb_components = 3,
1226 .log2_chroma_w = 0,
1227 .log2_chroma_h = 0,
1228 .comp = {
1229 { 0, 2, 1, 2, 5 }, /* R */
1230 { 0, 2, 0, 5, 5 }, /* G */
1231 { 0, 2, 0, 0, 5 }, /* B */
1232 },
1233 .flags = AV_PIX_FMT_FLAG_RGB,
1234 },
1235 [AV_PIX_FMT_RGB444BE] = {
1236 .name = "rgb444be",
1237 .nb_components = 3,
1238 .log2_chroma_w = 0,
1239 .log2_chroma_h = 0,
1240 .comp = {
1241 { 0, 2, -1, 0, 4 }, /* R */
1242 { 0, 2, 0, 4, 4 }, /* G */
1243 { 0, 2, 0, 0, 4 }, /* B */
1244 },
1245 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1246 },
1247 [AV_PIX_FMT_RGB444LE] = {
1248 .name = "rgb444le",
1249 .nb_components = 3,
1250 .log2_chroma_w = 0,
1251 .log2_chroma_h = 0,
1252 .comp = {
1253 { 0, 2, 1, 0, 4 }, /* R */
1254 { 0, 2, 0, 4, 4 }, /* G */
1255 { 0, 2, 0, 0, 4 }, /* B */
1256 },
1257 .flags = AV_PIX_FMT_FLAG_RGB,
1258 },
1259 [AV_PIX_FMT_BGR48BE] = {
1260 .name = "bgr48be",
1261 .nb_components = 3,
1262 .log2_chroma_w = 0,
1263 .log2_chroma_h = 0,
1264 .comp = {
1265 { 0, 6, 4, 0, 16 }, /* R */
1266 { 0, 6, 2, 0, 16 }, /* G */
1267 { 0, 6, 0, 0, 16 }, /* B */
1268 },
1269 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1270 },
1271 [AV_PIX_FMT_BGR48LE] = {
1272 .name = "bgr48le",
1273 .nb_components = 3,
1274 .log2_chroma_w = 0,
1275 .log2_chroma_h = 0,
1276 .comp = {
1277 { 0, 6, 4, 0, 16 }, /* R */
1278 { 0, 6, 2, 0, 16 }, /* G */
1279 { 0, 6, 0, 0, 16 }, /* B */
1280 },
1281 .flags = AV_PIX_FMT_FLAG_RGB,
1282 },
1283 [AV_PIX_FMT_BGRA64BE] = {
1284 .name = "bgra64be",
1285 .nb_components = 4,
1286 .log2_chroma_w = 0,
1287 .log2_chroma_h = 0,
1288 .comp = {
1289 { 0, 8, 4, 0, 16 }, /* R */
1290 { 0, 8, 2, 0, 16 }, /* G */
1291 { 0, 8, 0, 0, 16 }, /* B */
1292 { 0, 8, 6, 0, 16 }, /* A */
1293 },
1294 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1295 },
1296 [AV_PIX_FMT_BGRA64LE] = {
1297 .name = "bgra64le",
1298 .nb_components = 4,
1299 .log2_chroma_w = 0,
1300 .log2_chroma_h = 0,
1301 .comp = {
1302 { 0, 8, 4, 0, 16 }, /* R */
1303 { 0, 8, 2, 0, 16 }, /* G */
1304 { 0, 8, 0, 0, 16 }, /* B */
1305 { 0, 8, 6, 0, 16 }, /* A */
1306 },
1307 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1308 },
1309 [AV_PIX_FMT_BGR565BE] = {
1310 .name = "bgr565be",
1311 .nb_components = 3,
1312 .log2_chroma_w = 0,
1313 .log2_chroma_h = 0,
1314 .comp = {
1315 { 0, 2, 0, 0, 5 }, /* R */
1316 { 0, 2, 0, 5, 6 }, /* G */
1317 { 0, 2, -1, 3, 5 }, /* B */
1318 },
1319 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1320 },
1321 [AV_PIX_FMT_BGR565LE] = {
1322 .name = "bgr565le",
1323 .nb_components = 3,
1324 .log2_chroma_w = 0,
1325 .log2_chroma_h = 0,
1326 .comp = {
1327 { 0, 2, 0, 0, 5 }, /* R */
1328 { 0, 2, 0, 5, 6 }, /* G */
1329 { 0, 2, 1, 3, 5 }, /* B */
1330 },
1331 .flags = AV_PIX_FMT_FLAG_RGB,
1332 },
1333 [AV_PIX_FMT_BGR555BE] = {
1334 .name = "bgr555be",
1335 .nb_components = 3,
1336 .log2_chroma_w = 0,
1337 .log2_chroma_h = 0,
1338 .comp = {
1339 { 0, 2, 0, 0, 5 }, /* R */
1340 { 0, 2, 0, 5, 5 }, /* G */
1341 { 0, 2, -1, 2, 5 }, /* B */
1342 },
1343 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1344 },
1345 [AV_PIX_FMT_BGR555LE] = {
1346 .name = "bgr555le",
1347 .nb_components = 3,
1348 .log2_chroma_w = 0,
1349 .log2_chroma_h = 0,
1350 .comp = {
1351 { 0, 2, 0, 0, 5 }, /* R */
1352 { 0, 2, 0, 5, 5 }, /* G */
1353 { 0, 2, 1, 2, 5 }, /* B */
1354 },
1355 .flags = AV_PIX_FMT_FLAG_RGB,
1356 },
1357 [AV_PIX_FMT_BGR444BE] = {
1358 .name = "bgr444be",
1359 .nb_components = 3,
1360 .log2_chroma_w = 0,
1361 .log2_chroma_h = 0,
1362 .comp = {
1363 { 0, 2, 0, 0, 4 }, /* R */
1364 { 0, 2, 0, 4, 4 }, /* G */
1365 { 0, 2, -1, 0, 4 }, /* B */
1366 },
1367 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1368 },
1369 [AV_PIX_FMT_BGR444LE] = {
1370 .name = "bgr444le",
1371 .nb_components = 3,
1372 .log2_chroma_w = 0,
1373 .log2_chroma_h = 0,
1374 .comp = {
1375 { 0, 2, 0, 0, 4 }, /* R */
1376 { 0, 2, 0, 4, 4 }, /* G */
1377 { 0, 2, 1, 0, 4 }, /* B */
1378 },
1379 .flags = AV_PIX_FMT_FLAG_RGB,
1380 },
1381 [AV_PIX_FMT_VAAPI] = {
1382 .name = "vaapi",
1383 .log2_chroma_w = 1,
1384 .log2_chroma_h = 1,
1385 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1386 },
1387 [AV_PIX_FMT_YUV420P9LE] = {
1388 .name = "yuv420p9le",
1389 .nb_components = 3,
1390 .log2_chroma_w = 1,
1391 .log2_chroma_h = 1,
1392 .comp = {
1393 { 0, 2, 0, 0, 9 }, /* Y */
1394 { 1, 2, 0, 0, 9 }, /* U */
1395 { 2, 2, 0, 0, 9 }, /* V */
1396 },
1397 .flags = AV_PIX_FMT_FLAG_PLANAR,
1398 },
1399 [AV_PIX_FMT_YUV420P9BE] = {
1400 .name = "yuv420p9be",
1401 .nb_components = 3,
1402 .log2_chroma_w = 1,
1403 .log2_chroma_h = 1,
1404 .comp = {
1405 { 0, 2, 0, 0, 9 }, /* Y */
1406 { 1, 2, 0, 0, 9 }, /* U */
1407 { 2, 2, 0, 0, 9 }, /* V */
1408 },
1409 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1410 },
1411 [AV_PIX_FMT_YUV420P10LE] = {
1412 .name = "yuv420p10le",
1413 .nb_components = 3,
1414 .log2_chroma_w = 1,
1415 .log2_chroma_h = 1,
1416 .comp = {
1417 { 0, 2, 0, 0, 10 }, /* Y */
1418 { 1, 2, 0, 0, 10 }, /* U */
1419 { 2, 2, 0, 0, 10 }, /* V */
1420 },
1421 .flags = AV_PIX_FMT_FLAG_PLANAR,
1422 },
1423 [AV_PIX_FMT_YUV420P10BE] = {
1424 .name = "yuv420p10be",
1425 .nb_components = 3,
1426 .log2_chroma_w = 1,
1427 .log2_chroma_h = 1,
1428 .comp = {
1429 { 0, 2, 0, 0, 10 }, /* Y */
1430 { 1, 2, 0, 0, 10 }, /* U */
1431 { 2, 2, 0, 0, 10 }, /* V */
1432 },
1433 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1434 },
1435 [AV_PIX_FMT_YUV420P12LE] = {
1436 .name = "yuv420p12le",
1437 .nb_components = 3,
1438 .log2_chroma_w = 1,
1439 .log2_chroma_h = 1,
1440 .comp = {
1441 { 0, 2, 0, 0, 12 }, /* Y */
1442 { 1, 2, 0, 0, 12 }, /* U */
1443 { 2, 2, 0, 0, 12 }, /* V */
1444 },
1445 .flags = AV_PIX_FMT_FLAG_PLANAR,
1446 },
1447 [AV_PIX_FMT_YUV420P12BE] = {
1448 .name = "yuv420p12be",
1449 .nb_components = 3,
1450 .log2_chroma_w = 1,
1451 .log2_chroma_h = 1,
1452 .comp = {
1453 { 0, 2, 0, 0, 12 }, /* Y */
1454 { 1, 2, 0, 0, 12 }, /* U */
1455 { 2, 2, 0, 0, 12 }, /* V */
1456 },
1457 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1458 },
1459 [AV_PIX_FMT_YUV420P14LE] = {
1460 .name = "yuv420p14le",
1461 .nb_components = 3,
1462 .log2_chroma_w = 1,
1463 .log2_chroma_h = 1,
1464 .comp = {
1465 { 0, 2, 0, 0, 14 }, /* Y */
1466 { 1, 2, 0, 0, 14 }, /* U */
1467 { 2, 2, 0, 0, 14 }, /* V */
1468 },
1469 .flags = AV_PIX_FMT_FLAG_PLANAR,
1470 },
1471 [AV_PIX_FMT_YUV420P14BE] = {
1472 .name = "yuv420p14be",
1473 .nb_components = 3,
1474 .log2_chroma_w = 1,
1475 .log2_chroma_h = 1,
1476 .comp = {
1477 { 0, 2, 0, 0, 14 }, /* Y */
1478 { 1, 2, 0, 0, 14 }, /* U */
1479 { 2, 2, 0, 0, 14 }, /* V */
1480 },
1481 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1482 },
1483 [AV_PIX_FMT_YUV420P16LE] = {
1484 .name = "yuv420p16le",
1485 .nb_components = 3,
1486 .log2_chroma_w = 1,
1487 .log2_chroma_h = 1,
1488 .comp = {
1489 { 0, 2, 0, 0, 16 }, /* Y */
1490 { 1, 2, 0, 0, 16 }, /* U */
1491 { 2, 2, 0, 0, 16 }, /* V */
1492 },
1493 .flags = AV_PIX_FMT_FLAG_PLANAR,
1494 },
1495 [AV_PIX_FMT_YUV420P16BE] = {
1496 .name = "yuv420p16be",
1497 .nb_components = 3,
1498 .log2_chroma_w = 1,
1499 .log2_chroma_h = 1,
1500 .comp = {
1501 { 0, 2, 0, 0, 16 }, /* Y */
1502 { 1, 2, 0, 0, 16 }, /* U */
1503 { 2, 2, 0, 0, 16 }, /* V */
1504 },
1505 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1506 },
1507 [AV_PIX_FMT_YUV422P9LE] = {
1508 .name = "yuv422p9le",
1509 .nb_components = 3,
1510 .log2_chroma_w = 1,
1511 .log2_chroma_h = 0,
1512 .comp = {
1513 { 0, 2, 0, 0, 9 }, /* Y */
1514 { 1, 2, 0, 0, 9 }, /* U */
1515 { 2, 2, 0, 0, 9 }, /* V */
1516 },
1517 .flags = AV_PIX_FMT_FLAG_PLANAR,
1518 },
1519 [AV_PIX_FMT_YUV422P9BE] = {
1520 .name = "yuv422p9be",
1521 .nb_components = 3,
1522 .log2_chroma_w = 1,
1523 .log2_chroma_h = 0,
1524 .comp = {
1525 { 0, 2, 0, 0, 9 }, /* Y */
1526 { 1, 2, 0, 0, 9 }, /* U */
1527 { 2, 2, 0, 0, 9 }, /* V */
1528 },
1529 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1530 },
1531 [AV_PIX_FMT_YUV422P10LE] = {
1532 .name = "yuv422p10le",
1533 .nb_components = 3,
1534 .log2_chroma_w = 1,
1535 .log2_chroma_h = 0,
1536 .comp = {
1537 { 0, 2, 0, 0, 10 }, /* Y */
1538 { 1, 2, 0, 0, 10 }, /* U */
1539 { 2, 2, 0, 0, 10 }, /* V */
1540 },
1541 .flags = AV_PIX_FMT_FLAG_PLANAR,
1542 },
1543 [AV_PIX_FMT_YUV422P10BE] = {
1544 .name = "yuv422p10be",
1545 .nb_components = 3,
1546 .log2_chroma_w = 1,
1547 .log2_chroma_h = 0,
1548 .comp = {
1549 { 0, 2, 0, 0, 10 }, /* Y */
1550 { 1, 2, 0, 0, 10 }, /* U */
1551 { 2, 2, 0, 0, 10 }, /* V */
1552 },
1553 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1554 },
1555 [AV_PIX_FMT_YUV422P12LE] = {
1556 .name = "yuv422p12le",
1557 .nb_components = 3,
1558 .log2_chroma_w = 1,
1559 .log2_chroma_h = 0,
1560 .comp = {
1561 { 0, 2, 0, 0, 12 }, /* Y */
1562 { 1, 2, 0, 0, 12 }, /* U */
1563 { 2, 2, 0, 0, 12 }, /* V */
1564 },
1565 .flags = AV_PIX_FMT_FLAG_PLANAR,
1566 },
1567 [AV_PIX_FMT_YUV422P12BE] = {
1568 .name = "yuv422p12be",
1569 .nb_components = 3,
1570 .log2_chroma_w = 1,
1571 .log2_chroma_h = 0,
1572 .comp = {
1573 { 0, 2, 0, 0, 12 }, /* Y */
1574 { 1, 2, 0, 0, 12 }, /* U */
1575 { 2, 2, 0, 0, 12 }, /* V */
1576 },
1577 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1578 },
1579 [AV_PIX_FMT_YUV422P14LE] = {
1580 .name = "yuv422p14le",
1581 .nb_components = 3,
1582 .log2_chroma_w = 1,
1583 .log2_chroma_h = 0,
1584 .comp = {
1585 { 0, 2, 0, 0, 14 }, /* Y */
1586 { 1, 2, 0, 0, 14 }, /* U */
1587 { 2, 2, 0, 0, 14 }, /* V */
1588 },
1589 .flags = AV_PIX_FMT_FLAG_PLANAR,
1590 },
1591 [AV_PIX_FMT_YUV422P14BE] = {
1592 .name = "yuv422p14be",
1593 .nb_components = 3,
1594 .log2_chroma_w = 1,
1595 .log2_chroma_h = 0,
1596 .comp = {
1597 { 0, 2, 0, 0, 14 }, /* Y */
1598 { 1, 2, 0, 0, 14 }, /* U */
1599 { 2, 2, 0, 0, 14 }, /* V */
1600 },
1601 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1602 },
1603 [AV_PIX_FMT_YUV422P16LE] = {
1604 .name = "yuv422p16le",
1605 .nb_components = 3,
1606 .log2_chroma_w = 1,
1607 .log2_chroma_h = 0,
1608 .comp = {
1609 { 0, 2, 0, 0, 16 }, /* Y */
1610 { 1, 2, 0, 0, 16 }, /* U */
1611 { 2, 2, 0, 0, 16 }, /* V */
1612 },
1613 .flags = AV_PIX_FMT_FLAG_PLANAR,
1614 },
1615 [AV_PIX_FMT_YUV422P16BE] = {
1616 .name = "yuv422p16be",
1617 .nb_components = 3,
1618 .log2_chroma_w = 1,
1619 .log2_chroma_h = 0,
1620 .comp = {
1621 { 0, 2, 0, 0, 16 }, /* Y */
1622 { 1, 2, 0, 0, 16 }, /* U */
1623 { 2, 2, 0, 0, 16 }, /* V */
1624 },
1625 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1626 },
1627 [AV_PIX_FMT_YUV444P16LE] = {
1628 .name = "yuv444p16le",
1629 .nb_components = 3,
1630 .log2_chroma_w = 0,
1631 .log2_chroma_h = 0,
1632 .comp = {
1633 { 0, 2, 0, 0, 16 }, /* Y */
1634 { 1, 2, 0, 0, 16 }, /* U */
1635 { 2, 2, 0, 0, 16 }, /* V */
1636 },
1637 .flags = AV_PIX_FMT_FLAG_PLANAR,
1638 },
1639 [AV_PIX_FMT_YUV444P16BE] = {
1640 .name = "yuv444p16be",
1641 .nb_components = 3,
1642 .log2_chroma_w = 0,
1643 .log2_chroma_h = 0,
1644 .comp = {
1645 { 0, 2, 0, 0, 16 }, /* Y */
1646 { 1, 2, 0, 0, 16 }, /* U */
1647 { 2, 2, 0, 0, 16 }, /* V */
1648 },
1649 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1650 },
1651 [AV_PIX_FMT_YUV444P10LE] = {
1652 .name = "yuv444p10le",
1653 .nb_components = 3,
1654 .log2_chroma_w = 0,
1655 .log2_chroma_h = 0,
1656 .comp = {
1657 { 0, 2, 0, 0, 10 }, /* Y */
1658 { 1, 2, 0, 0, 10 }, /* U */
1659 { 2, 2, 0, 0, 10 }, /* V */
1660 },
1661 .flags = AV_PIX_FMT_FLAG_PLANAR,
1662 },
1663 [AV_PIX_FMT_YUV444P10BE] = {
1664 .name = "yuv444p10be",
1665 .nb_components = 3,
1666 .log2_chroma_w = 0,
1667 .log2_chroma_h = 0,
1668 .comp = {
1669 { 0, 2, 0, 0, 10 }, /* Y */
1670 { 1, 2, 0, 0, 10 }, /* U */
1671 { 2, 2, 0, 0, 10 }, /* V */
1672 },
1673 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1674 },
1675 [AV_PIX_FMT_YUV444P9LE] = {
1676 .name = "yuv444p9le",
1677 .nb_components = 3,
1678 .log2_chroma_w = 0,
1679 .log2_chroma_h = 0,
1680 .comp = {
1681 { 0, 2, 0, 0, 9 }, /* Y */
1682 { 1, 2, 0, 0, 9 }, /* U */
1683 { 2, 2, 0, 0, 9 }, /* V */
1684 },
1685 .flags = AV_PIX_FMT_FLAG_PLANAR,
1686 },
1687 [AV_PIX_FMT_YUV444P9BE] = {
1688 .name = "yuv444p9be",
1689 .nb_components = 3,
1690 .log2_chroma_w = 0,
1691 .log2_chroma_h = 0,
1692 .comp = {
1693 { 0, 2, 0, 0, 9 }, /* Y */
1694 { 1, 2, 0, 0, 9 }, /* U */
1695 { 2, 2, 0, 0, 9 }, /* V */
1696 },
1697 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1698 },
1699 [AV_PIX_FMT_YUV444P12LE] = {
1700 .name = "yuv444p12le",
1701 .nb_components = 3,
1702 .log2_chroma_w = 0,
1703 .log2_chroma_h = 0,
1704 .comp = {
1705 { 0, 2, 0, 0, 12 }, /* Y */
1706 { 1, 2, 0, 0, 12 }, /* U */
1707 { 2, 2, 0, 0, 12 }, /* V */
1708 },
1709 .flags = AV_PIX_FMT_FLAG_PLANAR,
1710 },
1711 [AV_PIX_FMT_YUV444P12BE] = {
1712 .name = "yuv444p12be",
1713 .nb_components = 3,
1714 .log2_chroma_w = 0,
1715 .log2_chroma_h = 0,
1716 .comp = {
1717 { 0, 2, 0, 0, 12 }, /* Y */
1718 { 1, 2, 0, 0, 12 }, /* U */
1719 { 2, 2, 0, 0, 12 }, /* V */
1720 },
1721 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1722 },
1723 [AV_PIX_FMT_YUV444P14LE] = {
1724 .name = "yuv444p14le",
1725 .nb_components = 3,
1726 .log2_chroma_w = 0,
1727 .log2_chroma_h = 0,
1728 .comp = {
1729 { 0, 2, 0, 0, 14 }, /* Y */
1730 { 1, 2, 0, 0, 14 }, /* U */
1731 { 2, 2, 0, 0, 14 }, /* V */
1732 },
1733 .flags = AV_PIX_FMT_FLAG_PLANAR,
1734 },
1735 [AV_PIX_FMT_YUV444P14BE] = {
1736 .name = "yuv444p14be",
1737 .nb_components = 3,
1738 .log2_chroma_w = 0,
1739 .log2_chroma_h = 0,
1740 .comp = {
1741 { 0, 2, 0, 0, 14 }, /* Y */
1742 { 1, 2, 0, 0, 14 }, /* U */
1743 { 2, 2, 0, 0, 14 }, /* V */
1744 },
1745 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1746 },
1747 [AV_PIX_FMT_D3D11VA_VLD] = {
1748 .name = "d3d11va_vld",
1749 .log2_chroma_w = 1,
1750 .log2_chroma_h = 1,
1751 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1752 },
1753 [AV_PIX_FMT_DXVA2_VLD] = {
1754 .name = "dxva2_vld",
1755 .log2_chroma_w = 1,
1756 .log2_chroma_h = 1,
1757 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1758 },
1759 [AV_PIX_FMT_YA8] = {
1760 .name = "ya8",
1761 .nb_components = 2,
1762 .comp = {
1763 { 0, 2, 0, 0, 8 }, /* Y */
1764 { 0, 2, 1, 0, 8 }, /* A */
1765 },
1766 .flags = AV_PIX_FMT_FLAG_ALPHA,
1767 .alias = "gray8a",
1768 },
1769 [AV_PIX_FMT_YA16LE] = {
1770 .name = "ya16le",
1771 .nb_components = 2,
1772 .comp = {
1773 { 0, 4, 0, 0, 16 }, /* Y */
1774 { 0, 4, 2, 0, 16 }, /* A */
1775 },
1776 .flags = AV_PIX_FMT_FLAG_ALPHA,
1777 },
1778 [AV_PIX_FMT_YA16BE] = {
1779 .name = "ya16be",
1780 .nb_components = 2,
1781 .comp = {
1782 { 0, 4, 0, 0, 16 }, /* Y */
1783 { 0, 4, 2, 0, 16 }, /* A */
1784 },
1785 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
1786 },
1787 [AV_PIX_FMT_VIDEOTOOLBOX] = {
1788 .name = "videotoolbox_vld",
1789 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1790 },
1791 [AV_PIX_FMT_GBRP] = {
1792 .name = "gbrp",
1793 .nb_components = 3,
1794 .log2_chroma_w = 0,
1795 .log2_chroma_h = 0,
1796 .comp = {
1797 { 2, 1, 0, 0, 8 }, /* R */
1798 { 0, 1, 0, 0, 8 }, /* G */
1799 { 1, 1, 0, 0, 8 }, /* B */
1800 },
1801 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1802 },
1803 [AV_PIX_FMT_GBRP9LE] = {
1804 .name = "gbrp9le",
1805 .nb_components = 3,
1806 .log2_chroma_w = 0,
1807 .log2_chroma_h = 0,
1808 .comp = {
1809 { 2, 2, 0, 0, 9 }, /* R */
1810 { 0, 2, 0, 0, 9 }, /* G */
1811 { 1, 2, 0, 0, 9 }, /* B */
1812 },
1813 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1814 },
1815 [AV_PIX_FMT_GBRP9BE] = {
1816 .name = "gbrp9be",
1817 .nb_components = 3,
1818 .log2_chroma_w = 0,
1819 .log2_chroma_h = 0,
1820 .comp = {
1821 { 2, 2, 0, 0, 9 }, /* R */
1822 { 0, 2, 0, 0, 9 }, /* G */
1823 { 1, 2, 0, 0, 9 }, /* B */
1824 },
1825 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1826 },
1827 [AV_PIX_FMT_GBRP10LE] = {
1828 .name = "gbrp10le",
1829 .nb_components = 3,
1830 .log2_chroma_w = 0,
1831 .log2_chroma_h = 0,
1832 .comp = {
1833 { 2, 2, 0, 0, 10 }, /* R */
1834 { 0, 2, 0, 0, 10 }, /* G */
1835 { 1, 2, 0, 0, 10 }, /* B */
1836 },
1837 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1838 },
1839 [AV_PIX_FMT_GBRP10BE] = {
1840 .name = "gbrp10be",
1841 .nb_components = 3,
1842 .log2_chroma_w = 0,
1843 .log2_chroma_h = 0,
1844 .comp = {
1845 { 2, 2, 0, 0, 10 }, /* R */
1846 { 0, 2, 0, 0, 10 }, /* G */
1847 { 1, 2, 0, 0, 10 }, /* B */
1848 },
1849 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1850 },
1851 [AV_PIX_FMT_GBRP12LE] = {
1852 .name = "gbrp12le",
1853 .nb_components = 3,
1854 .log2_chroma_w = 0,
1855 .log2_chroma_h = 0,
1856 .comp = {
1857 { 2, 2, 0, 0, 12 }, /* R */
1858 { 0, 2, 0, 0, 12 }, /* G */
1859 { 1, 2, 0, 0, 12 }, /* B */
1860 },
1861 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1862 },
1863 [AV_PIX_FMT_GBRP12BE] = {
1864 .name = "gbrp12be",
1865 .nb_components = 3,
1866 .log2_chroma_w = 0,
1867 .log2_chroma_h = 0,
1868 .comp = {
1869 { 2, 2, 0, 0, 12 }, /* R */
1870 { 0, 2, 0, 0, 12 }, /* G */
1871 { 1, 2, 0, 0, 12 }, /* B */
1872 },
1873 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1874 },
1875 [AV_PIX_FMT_GBRP14LE] = {
1876 .name = "gbrp14le",
1877 .nb_components = 3,
1878 .log2_chroma_w = 0,
1879 .log2_chroma_h = 0,
1880 .comp = {
1881 { 2, 2, 0, 0, 14 }, /* R */
1882 { 0, 2, 0, 0, 14 }, /* G */
1883 { 1, 2, 0, 0, 14 }, /* B */
1884 },
1885 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1886 },
1887 [AV_PIX_FMT_GBRP14BE] = {
1888 .name = "gbrp14be",
1889 .nb_components = 3,
1890 .log2_chroma_w = 0,
1891 .log2_chroma_h = 0,
1892 .comp = {
1893 { 2, 2, 0, 0, 14 }, /* R */
1894 { 0, 2, 0, 0, 14 }, /* G */
1895 { 1, 2, 0, 0, 14 }, /* B */
1896 },
1897 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1898 },
1899 [AV_PIX_FMT_GBRP16LE] = {
1900 .name = "gbrp16le",
1901 .nb_components = 3,
1902 .log2_chroma_w = 0,
1903 .log2_chroma_h = 0,
1904 .comp = {
1905 { 2, 2, 0, 0, 16 }, /* R */
1906 { 0, 2, 0, 0, 16 }, /* G */
1907 { 1, 2, 0, 0, 16 }, /* B */
1908 },
1909 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1910 },
1911 [AV_PIX_FMT_GBRP16BE] = {
1912 .name = "gbrp16be",
1913 .nb_components = 3,
1914 .log2_chroma_w = 0,
1915 .log2_chroma_h = 0,
1916 .comp = {
1917 { 2, 2, 0, 0, 16 }, /* R */
1918 { 0, 2, 0, 0, 16 }, /* G */
1919 { 1, 2, 0, 0, 16 }, /* B */
1920 },
1921 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1922 },
1923 [AV_PIX_FMT_GBRAP] = {
1924 .name = "gbrap",
1925 .nb_components = 4,
1926 .log2_chroma_w = 0,
1927 .log2_chroma_h = 0,
1928 .comp = {
1929 { 2, 1, 0, 0, 8 }, /* R */
1930 { 0, 1, 0, 0, 8 }, /* G */
1931 { 1, 1, 0, 0, 8 }, /* B */
1932 { 3, 1, 0, 0, 8 }, /* A */
1933 },
1934 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
1935 AV_PIX_FMT_FLAG_ALPHA,
1936 },
1937 [AV_PIX_FMT_GBRAP16LE] = {
1938 .name = "gbrap16le",
1939 .nb_components = 4,
1940 .log2_chroma_w = 0,
1941 .log2_chroma_h = 0,
1942 .comp = {
1943 { 2, 2, 0, 0, 16 }, /* R */
1944 { 0, 2, 0, 0, 16 }, /* G */
1945 { 1, 2, 0, 0, 16 }, /* B */
1946 { 3, 2, 0, 0, 16 }, /* A */
1947 },
1948 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
1949 AV_PIX_FMT_FLAG_ALPHA,
1950 },
1951 [AV_PIX_FMT_GBRAP16BE] = {
1952 .name = "gbrap16be",
1953 .nb_components = 4,
1954 .log2_chroma_w = 0,
1955 .log2_chroma_h = 0,
1956 .comp = {
1957 { 2, 2, 0, 0, 16 }, /* R */
1958 { 0, 2, 0, 0, 16 }, /* G */
1959 { 1, 2, 0, 0, 16 }, /* B */
1960 { 3, 2, 0, 0, 16 }, /* A */
1961 },
1962 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
1963 AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1964 },
1965 [AV_PIX_FMT_VDPAU] = {
1966 .name = "vdpau",
1967 .log2_chroma_w = 1,
1968 .log2_chroma_h = 1,
1969 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1970 },
1971 [AV_PIX_FMT_XYZ12LE] = {
1972 .name = "xyz12le",
1973 .nb_components = 3,
1974 .log2_chroma_w = 0,
1975 .log2_chroma_h = 0,
1976 .comp = {
1977 { 0, 6, 0, 4, 12 }, /* X */
1978 { 0, 6, 2, 4, 12 }, /* Y */
1979 { 0, 6, 4, 4, 12 }, /* Z */
1980 },
1981 .flags = AV_PIX_FMT_FLAG_XYZ,
1982 },
1983 [AV_PIX_FMT_XYZ12BE] = {
1984 .name = "xyz12be",
1985 .nb_components = 3,
1986 .log2_chroma_w = 0,
1987 .log2_chroma_h = 0,
1988 .comp = {
1989 { 0, 6, 0, 4, 12 }, /* X */
1990 { 0, 6, 2, 4, 12 }, /* Y */
1991 { 0, 6, 4, 4, 12 }, /* Z */
1992 },
1993 .flags = AV_PIX_FMT_FLAG_XYZ | AV_PIX_FMT_FLAG_BE,
1994 },
1995
1996 #define BAYER8_DESC_COMMON \
1997 .nb_components= 3, \
1998 .log2_chroma_w= 0, \
1999 .log2_chroma_h= 0, \
2000 .comp = { \
2001 { 0, 1, 0, 0, 2 }, \
2002 { 0, 1, 0, 0, 4 }, \
2003 { 0, 1, 0, 0, 2 }, \
2004 }, \
2005
2006 #define BAYER16_DESC_COMMON \
2007 .nb_components= 3, \
2008 .log2_chroma_w= 0, \
2009 .log2_chroma_h= 0, \
2010 .comp = { \
2011 { 0, 2, 0, 0, 4 }, \
2012 { 0, 2, 0, 0, 8 }, \
2013 { 0, 2, 0, 0, 4 }, \
2014 }, \
2015
2016 [AV_PIX_FMT_BAYER_BGGR8] = {
2017 .name = "bayer_bggr8",
2018 BAYER8_DESC_COMMON
2019 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2020 },
2021 [AV_PIX_FMT_BAYER_BGGR16LE] = {
2022 .name = "bayer_bggr16le",
2023 BAYER16_DESC_COMMON
2024 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2025 },
2026 [AV_PIX_FMT_BAYER_BGGR16BE] = {
2027 .name = "bayer_bggr16be",
2028 BAYER16_DESC_COMMON
2029 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2030 },
2031 [AV_PIX_FMT_BAYER_RGGB8] = {
2032 .name = "bayer_rggb8",
2033 BAYER8_DESC_COMMON
2034 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2035 },
2036 [AV_PIX_FMT_BAYER_RGGB16LE] = {
2037 .name = "bayer_rggb16le",
2038 BAYER16_DESC_COMMON
2039 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2040 },
2041 [AV_PIX_FMT_BAYER_RGGB16BE] = {
2042 .name = "bayer_rggb16be",
2043 BAYER16_DESC_COMMON
2044 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2045 },
2046 [AV_PIX_FMT_BAYER_GBRG8] = {
2047 .name = "bayer_gbrg8",
2048 BAYER8_DESC_COMMON
2049 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2050 },
2051 [AV_PIX_FMT_BAYER_GBRG16LE] = {
2052 .name = "bayer_gbrg16le",
2053 BAYER16_DESC_COMMON
2054 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2055 },
2056 [AV_PIX_FMT_BAYER_GBRG16BE] = {
2057 .name = "bayer_gbrg16be",
2058 BAYER16_DESC_COMMON
2059 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2060 },
2061 [AV_PIX_FMT_BAYER_GRBG8] = {
2062 .name = "bayer_grbg8",
2063 BAYER8_DESC_COMMON
2064 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2065 },
2066 [AV_PIX_FMT_BAYER_GRBG16LE] = {
2067 .name = "bayer_grbg16le",
2068 BAYER16_DESC_COMMON
2069 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2070 },
2071 [AV_PIX_FMT_BAYER_GRBG16BE] = {
2072 .name = "bayer_grbg16be",
2073 BAYER16_DESC_COMMON
2074 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2075 },
2076 [AV_PIX_FMT_NV16] = {
2077 .name = "nv16",
2078 .nb_components = 3,
2079 .log2_chroma_w = 1,
2080 .log2_chroma_h = 0,
2081 .comp = {
2082 { 0, 1, 0, 0, 8 }, /* Y */
2083 { 1, 2, 0, 0, 8 }, /* U */
2084 { 1, 2, 1, 0, 8 }, /* V */
2085 },
2086 .flags = AV_PIX_FMT_FLAG_PLANAR,
2087 },
2088 [AV_PIX_FMT_NV20LE] = {
2089 .name = "nv20le",
2090 .nb_components = 3,
2091 .log2_chroma_w = 1,
2092 .log2_chroma_h = 0,
2093 .comp = {
2094 { 0, 2, 0, 0, 10 }, /* Y */
2095 { 1, 4, 0, 0, 10 }, /* U */
2096 { 1, 4, 2, 0, 10 }, /* V */
2097 },
2098 .flags = AV_PIX_FMT_FLAG_PLANAR,
2099 },
2100 [AV_PIX_FMT_NV20BE] = {
2101 .name = "nv20be",
2102 .nb_components = 3,
2103 .log2_chroma_w = 1,
2104 .log2_chroma_h = 0,
2105 .comp = {
2106 { 0, 2, 0, 0, 10 }, /* Y */
2107 { 1, 4, 0, 0, 10 }, /* U */
2108 { 1, 4, 2, 0, 10 }, /* V */
2109 },
2110 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
2111 },
2112 [AV_PIX_FMT_QSV] = {
2113 .name = "qsv",
2114 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2115 },
2116 [AV_PIX_FMT_MEDIACODEC] = {
2117 .name = "mediacodec",
2118 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2119 },
2120 [AV_PIX_FMT_MMAL] = {
2121 .name = "mmal",
2122 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2123 },
2124 [AV_PIX_FMT_CUDA] = {
2125 .name = "cuda",
2126 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2127 },
2128 [AV_PIX_FMT_AYUV64LE] = {
2129 .name = "ayuv64le",
2130 .nb_components = 4,
2131 .log2_chroma_w = 0,
2132 .log2_chroma_h = 0,
2133 .comp = {
2134 { 0, 8, 2, 0, 16 }, /* Y */
2135 { 0, 8, 4, 0, 16 }, /* U */
2136 { 0, 8, 6, 0, 16 }, /* V */
2137 { 0, 8, 0, 0, 16 }, /* A */
2138 },
2139 .flags = AV_PIX_FMT_FLAG_ALPHA,
2140 },
2141 [AV_PIX_FMT_AYUV64BE] = {
2142 .name = "ayuv64be",
2143 .nb_components = 4,
2144 .log2_chroma_w = 0,
2145 .log2_chroma_h = 0,
2146 .comp = {
2147 { 0, 8, 2, 0, 16 }, /* Y */
2148 { 0, 8, 4, 0, 16 }, /* U */
2149 { 0, 8, 6, 0, 16 }, /* V */
2150 { 0, 8, 0, 0, 16 }, /* A */
2151 },
2152 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
2153 },
2154 [AV_PIX_FMT_P010LE] = {
2155 .name = "p010le",
2156 .nb_components = 3,
2157 .log2_chroma_w = 1,
2158 .log2_chroma_h = 1,
2159 .comp = {
2160 { 0, 2, 0, 6, 10 }, /* Y */
2161 { 1, 4, 0, 6, 10 }, /* U */
2162 { 1, 4, 2, 6, 10 }, /* V */
2163 },
2164 .flags = AV_PIX_FMT_FLAG_PLANAR,
2165 },
2166 [AV_PIX_FMT_P010BE] = {
2167 .name = "p010be",
2168 .nb_components = 3,
2169 .log2_chroma_w = 1,
2170 .log2_chroma_h = 1,
2171 .comp = {
2172 { 0, 2, 0, 6, 10 }, /* Y */
2173 { 1, 4, 0, 6, 10 }, /* U */
2174 { 1, 4, 2, 6, 10 }, /* V */
2175 },
2176 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
2177 },
2178 [AV_PIX_FMT_P012LE] = {
2179 .name = "p012le",
2180 .nb_components = 3,
2181 .log2_chroma_w = 1,
2182 .log2_chroma_h = 1,
2183 .comp = {
2184 { 0, 2, 0, 4, 12 }, /* Y */
2185 { 1, 4, 0, 4, 12 }, /* U */
2186 { 1, 4, 2, 4, 12 }, /* V */
2187 },
2188 .flags = AV_PIX_FMT_FLAG_PLANAR,
2189 },
2190 [AV_PIX_FMT_P012BE] = {
2191 .name = "p012be",
2192 .nb_components