FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavutil/pixdesc.c
Date: 2024-10-04 17:46:48
Exec Total Coverage
Lines: 337 392 86.0%
Functions: 28 33 84.8%
Branches: 251 329 76.3%

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 [AV_PIX_FMT_UYVY422] = {
464 .name = "uyvy422",
465 .nb_components = 3,
466 .log2_chroma_w = 1,
467 .log2_chroma_h = 0,
468 .comp = {
469 { 0, 2, 1, 0, 8 }, /* Y */
470 { 0, 4, 0, 0, 8 }, /* U */
471 { 0, 4, 2, 0, 8 }, /* V */
472 },
473 },
474 [AV_PIX_FMT_UYYVYY411] = {
475 .name = "uyyvyy411",
476 .nb_components = 3,
477 .log2_chroma_w = 2,
478 .log2_chroma_h = 0,
479 .comp = {
480 { 0, 4, 1, 0, 8 }, /* Y */
481 { 0, 6, 0, 0, 8 }, /* U */
482 { 0, 6, 3, 0, 8 }, /* V */
483 },
484 },
485 [AV_PIX_FMT_BGR8] = {
486 .name = "bgr8",
487 .nb_components = 3,
488 .log2_chroma_w = 0,
489 .log2_chroma_h = 0,
490 .comp = {
491 { 0, 1, 0, 0, 3 }, /* R */
492 { 0, 1, 0, 3, 3 }, /* G */
493 { 0, 1, 0, 6, 2 }, /* B */
494 },
495 .flags = AV_PIX_FMT_FLAG_RGB,
496 },
497 [AV_PIX_FMT_BGR4] = {
498 .name = "bgr4",
499 .nb_components = 3,
500 .log2_chroma_w = 0,
501 .log2_chroma_h = 0,
502 .comp = {
503 { 0, 4, 3, 0, 1 }, /* R */
504 { 0, 4, 1, 0, 2 }, /* G */
505 { 0, 4, 0, 0, 1 }, /* B */
506 },
507 .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
508 },
509 [AV_PIX_FMT_BGR4_BYTE] = {
510 .name = "bgr4_byte",
511 .nb_components = 3,
512 .log2_chroma_w = 0,
513 .log2_chroma_h = 0,
514 .comp = {
515 { 0, 1, 0, 0, 1 }, /* R */
516 { 0, 1, 0, 1, 2 }, /* G */
517 { 0, 1, 0, 3, 1 }, /* B */
518 },
519 .flags = AV_PIX_FMT_FLAG_RGB,
520 },
521 [AV_PIX_FMT_RGB8] = {
522 .name = "rgb8",
523 .nb_components = 3,
524 .log2_chroma_w = 0,
525 .log2_chroma_h = 0,
526 .comp = {
527 { 0, 1, 0, 5, 3 }, /* R */
528 { 0, 1, 0, 2, 3 }, /* G */
529 { 0, 1, 0, 0, 2 }, /* B */
530 },
531 .flags = AV_PIX_FMT_FLAG_RGB,
532 },
533 [AV_PIX_FMT_RGB4] = {
534 .name = "rgb4",
535 .nb_components = 3,
536 .log2_chroma_w = 0,
537 .log2_chroma_h = 0,
538 .comp = {
539 { 0, 4, 0, 0, 1 }, /* R */
540 { 0, 4, 1, 0, 2 }, /* G */
541 { 0, 4, 3, 0, 1 }, /* B */
542 },
543 .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
544 },
545 [AV_PIX_FMT_RGB4_BYTE] = {
546 .name = "rgb4_byte",
547 .nb_components = 3,
548 .log2_chroma_w = 0,
549 .log2_chroma_h = 0,
550 .comp = {
551 { 0, 1, 0, 3, 1 }, /* R */
552 { 0, 1, 0, 1, 2 }, /* G */
553 { 0, 1, 0, 0, 1 }, /* B */
554 },
555 .flags = AV_PIX_FMT_FLAG_RGB,
556 },
557 [AV_PIX_FMT_NV12] = {
558 .name = "nv12",
559 .nb_components = 3,
560 .log2_chroma_w = 1,
561 .log2_chroma_h = 1,
562 .comp = {
563 { 0, 1, 0, 0, 8 }, /* Y */
564 { 1, 2, 0, 0, 8 }, /* U */
565 { 1, 2, 1, 0, 8 }, /* V */
566 },
567 .flags = AV_PIX_FMT_FLAG_PLANAR,
568 },
569 [AV_PIX_FMT_NV21] = {
570 .name = "nv21",
571 .nb_components = 3,
572 .log2_chroma_w = 1,
573 .log2_chroma_h = 1,
574 .comp = {
575 { 0, 1, 0, 0, 8 }, /* Y */
576 { 1, 2, 1, 0, 8 }, /* U */
577 { 1, 2, 0, 0, 8 }, /* V */
578 },
579 .flags = AV_PIX_FMT_FLAG_PLANAR,
580 },
581 [AV_PIX_FMT_ARGB] = {
582 .name = "argb",
583 .nb_components = 4,
584 .log2_chroma_w = 0,
585 .log2_chroma_h = 0,
586 .comp = {
587 { 0, 4, 1, 0, 8 }, /* R */
588 { 0, 4, 2, 0, 8 }, /* G */
589 { 0, 4, 3, 0, 8 }, /* B */
590 { 0, 4, 0, 0, 8 }, /* A */
591 },
592 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
593 },
594 [AV_PIX_FMT_RGBA] = {
595 .name = "rgba",
596 .nb_components = 4,
597 .log2_chroma_w = 0,
598 .log2_chroma_h = 0,
599 .comp = {
600 { 0, 4, 0, 0, 8 }, /* R */
601 { 0, 4, 1, 0, 8 }, /* G */
602 { 0, 4, 2, 0, 8 }, /* B */
603 { 0, 4, 3, 0, 8 }, /* A */
604 },
605 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
606 },
607 [AV_PIX_FMT_ABGR] = {
608 .name = "abgr",
609 .nb_components = 4,
610 .log2_chroma_w = 0,
611 .log2_chroma_h = 0,
612 .comp = {
613 { 0, 4, 3, 0, 8 }, /* R */
614 { 0, 4, 2, 0, 8 }, /* G */
615 { 0, 4, 1, 0, 8 }, /* B */
616 { 0, 4, 0, 0, 8 }, /* A */
617 },
618 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
619 },
620 [AV_PIX_FMT_BGRA] = {
621 .name = "bgra",
622 .nb_components = 4,
623 .log2_chroma_w = 0,
624 .log2_chroma_h = 0,
625 .comp = {
626 { 0, 4, 2, 0, 8 }, /* R */
627 { 0, 4, 1, 0, 8 }, /* G */
628 { 0, 4, 0, 0, 8 }, /* B */
629 { 0, 4, 3, 0, 8 }, /* A */
630 },
631 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
632 },
633 [AV_PIX_FMT_0RGB] = {
634 .name = "0rgb",
635 .nb_components= 3,
636 .log2_chroma_w= 0,
637 .log2_chroma_h= 0,
638 .comp = {
639 { 0, 4, 1, 0, 8 }, /* R */
640 { 0, 4, 2, 0, 8 }, /* G */
641 { 0, 4, 3, 0, 8 }, /* B */
642 },
643 .flags = AV_PIX_FMT_FLAG_RGB,
644 },
645 [AV_PIX_FMT_RGB0] = {
646 .name = "rgb0",
647 .nb_components= 3,
648 .log2_chroma_w= 0,
649 .log2_chroma_h= 0,
650 .comp = {
651 { 0, 4, 0, 0, 8 }, /* R */
652 { 0, 4, 1, 0, 8 }, /* G */
653 { 0, 4, 2, 0, 8 }, /* B */
654 },
655 .flags = AV_PIX_FMT_FLAG_RGB,
656 },
657 [AV_PIX_FMT_0BGR] = {
658 .name = "0bgr",
659 .nb_components= 3,
660 .log2_chroma_w= 0,
661 .log2_chroma_h= 0,
662 .comp = {
663 { 0, 4, 3, 0, 8 }, /* R */
664 { 0, 4, 2, 0, 8 }, /* G */
665 { 0, 4, 1, 0, 8 }, /* B */
666 },
667 .flags = AV_PIX_FMT_FLAG_RGB,
668 },
669 [AV_PIX_FMT_BGR0] = {
670 .name = "bgr0",
671 .nb_components= 3,
672 .log2_chroma_w= 0,
673 .log2_chroma_h= 0,
674 .comp = {
675 { 0, 4, 2, 0, 8 }, /* R */
676 { 0, 4, 1, 0, 8 }, /* G */
677 { 0, 4, 0, 0, 8 }, /* B */
678 },
679 .flags = AV_PIX_FMT_FLAG_RGB,
680 },
681 [AV_PIX_FMT_GRAY9BE] = {
682 .name = "gray9be",
683 .nb_components = 1,
684 .log2_chroma_w = 0,
685 .log2_chroma_h = 0,
686 .comp = {
687 { 0, 2, 0, 0, 9 }, /* Y */
688 },
689 .flags = AV_PIX_FMT_FLAG_BE,
690 .alias = "y9be",
691 },
692 [AV_PIX_FMT_GRAY9LE] = {
693 .name = "gray9le",
694 .nb_components = 1,
695 .log2_chroma_w = 0,
696 .log2_chroma_h = 0,
697 .comp = {
698 { 0, 2, 0, 0, 9 }, /* Y */
699 },
700 .alias = "y9le",
701 },
702 [AV_PIX_FMT_GRAY10BE] = {
703 .name = "gray10be",
704 .nb_components = 1,
705 .log2_chroma_w = 0,
706 .log2_chroma_h = 0,
707 .comp = {
708 { 0, 2, 0, 0, 10 }, /* Y */
709 },
710 .flags = AV_PIX_FMT_FLAG_BE,
711 .alias = "y10be",
712 },
713 [AV_PIX_FMT_GRAY10LE] = {
714 .name = "gray10le",
715 .nb_components = 1,
716 .log2_chroma_w = 0,
717 .log2_chroma_h = 0,
718 .comp = {
719 { 0, 2, 0, 0, 10 }, /* Y */
720 },
721 .alias = "y10le",
722 },
723 [AV_PIX_FMT_GRAY12BE] = {
724 .name = "gray12be",
725 .nb_components = 1,
726 .log2_chroma_w = 0,
727 .log2_chroma_h = 0,
728 .comp = {
729 { 0, 2, 0, 0, 12 }, /* Y */
730 },
731 .flags = AV_PIX_FMT_FLAG_BE,
732 .alias = "y12be",
733 },
734 [AV_PIX_FMT_GRAY12LE] = {
735 .name = "gray12le",
736 .nb_components = 1,
737 .log2_chroma_w = 0,
738 .log2_chroma_h = 0,
739 .comp = {
740 { 0, 2, 0, 0, 12 }, /* Y */
741 },
742 .alias = "y12le",
743 },
744 [AV_PIX_FMT_GRAY14BE] = {
745 .name = "gray14be",
746 .nb_components = 1,
747 .log2_chroma_w = 0,
748 .log2_chroma_h = 0,
749 .comp = {
750 { 0, 2, 0, 0, 14 }, /* Y */
751 },
752 .flags = AV_PIX_FMT_FLAG_BE,
753 .alias = "y14be",
754 },
755 [AV_PIX_FMT_GRAY14LE] = {
756 .name = "gray14le",
757 .nb_components = 1,
758 .log2_chroma_w = 0,
759 .log2_chroma_h = 0,
760 .comp = {
761 { 0, 2, 0, 0, 14 }, /* Y */
762 },
763 .alias = "y14le",
764 },
765 [AV_PIX_FMT_GRAY16BE] = {
766 .name = "gray16be",
767 .nb_components = 1,
768 .log2_chroma_w = 0,
769 .log2_chroma_h = 0,
770 .comp = {
771 { 0, 2, 0, 0, 16 }, /* Y */
772 },
773 .flags = AV_PIX_FMT_FLAG_BE,
774 .alias = "y16be",
775 },
776 [AV_PIX_FMT_GRAY16LE] = {
777 .name = "gray16le",
778 .nb_components = 1,
779 .log2_chroma_w = 0,
780 .log2_chroma_h = 0,
781 .comp = {
782 { 0, 2, 0, 0, 16 }, /* Y */
783 },
784 .alias = "y16le",
785 },
786 [AV_PIX_FMT_YUV440P] = {
787 .name = "yuv440p",
788 .nb_components = 3,
789 .log2_chroma_w = 0,
790 .log2_chroma_h = 1,
791 .comp = {
792 { 0, 1, 0, 0, 8 }, /* Y */
793 { 1, 1, 0, 0, 8 }, /* U */
794 { 2, 1, 0, 0, 8 }, /* V */
795 },
796 .flags = AV_PIX_FMT_FLAG_PLANAR,
797 },
798 [AV_PIX_FMT_YUVJ440P] = {
799 .name = "yuvj440p",
800 .nb_components = 3,
801 .log2_chroma_w = 0,
802 .log2_chroma_h = 1,
803 .comp = {
804 { 0, 1, 0, 0, 8 }, /* Y */
805 { 1, 1, 0, 0, 8 }, /* U */
806 { 2, 1, 0, 0, 8 }, /* V */
807 },
808 .flags = AV_PIX_FMT_FLAG_PLANAR,
809 },
810 [AV_PIX_FMT_YUV440P10LE] = {
811 .name = "yuv440p10le",
812 .nb_components = 3,
813 .log2_chroma_w = 0,
814 .log2_chroma_h = 1,
815 .comp = {
816 { 0, 2, 0, 0, 10 }, /* Y */
817 { 1, 2, 0, 0, 10 }, /* U */
818 { 2, 2, 0, 0, 10 }, /* V */
819 },
820 .flags = AV_PIX_FMT_FLAG_PLANAR,
821 },
822 [AV_PIX_FMT_YUV440P10BE] = {
823 .name = "yuv440p10be",
824 .nb_components = 3,
825 .log2_chroma_w = 0,
826 .log2_chroma_h = 1,
827 .comp = {
828 { 0, 2, 0, 0, 10 }, /* Y */
829 { 1, 2, 0, 0, 10 }, /* U */
830 { 2, 2, 0, 0, 10 }, /* V */
831 },
832 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
833 },
834 [AV_PIX_FMT_YUV440P12LE] = {
835 .name = "yuv440p12le",
836 .nb_components = 3,
837 .log2_chroma_w = 0,
838 .log2_chroma_h = 1,
839 .comp = {
840 { 0, 2, 0, 0, 12 }, /* Y */
841 { 1, 2, 0, 0, 12 }, /* U */
842 { 2, 2, 0, 0, 12 }, /* V */
843 },
844 .flags = AV_PIX_FMT_FLAG_PLANAR,
845 },
846 [AV_PIX_FMT_YUV440P12BE] = {
847 .name = "yuv440p12be",
848 .nb_components = 3,
849 .log2_chroma_w = 0,
850 .log2_chroma_h = 1,
851 .comp = {
852 { 0, 2, 0, 0, 12 }, /* Y */
853 { 1, 2, 0, 0, 12 }, /* U */
854 { 2, 2, 0, 0, 12 }, /* V */
855 },
856 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
857 },
858 [AV_PIX_FMT_YUVA420P] = {
859 .name = "yuva420p",
860 .nb_components = 4,
861 .log2_chroma_w = 1,
862 .log2_chroma_h = 1,
863 .comp = {
864 { 0, 1, 0, 0, 8 }, /* Y */
865 { 1, 1, 0, 0, 8 }, /* U */
866 { 2, 1, 0, 0, 8 }, /* V */
867 { 3, 1, 0, 0, 8 }, /* A */
868 },
869 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
870 },
871 [AV_PIX_FMT_YUVA422P] = {
872 .name = "yuva422p",
873 .nb_components = 4,
874 .log2_chroma_w = 1,
875 .log2_chroma_h = 0,
876 .comp = {
877 { 0, 1, 0, 0, 8 }, /* Y */
878 { 1, 1, 0, 0, 8 }, /* U */
879 { 2, 1, 0, 0, 8 }, /* V */
880 { 3, 1, 0, 0, 8 }, /* A */
881 },
882 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
883 },
884 [AV_PIX_FMT_YUVA444P] = {
885 .name = "yuva444p",
886 .nb_components = 4,
887 .log2_chroma_w = 0,
888 .log2_chroma_h = 0,
889 .comp = {
890 { 0, 1, 0, 0, 8 }, /* Y */
891 { 1, 1, 0, 0, 8 }, /* U */
892 { 2, 1, 0, 0, 8 }, /* V */
893 { 3, 1, 0, 0, 8 }, /* A */
894 },
895 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
896 },
897 [AV_PIX_FMT_YUVA420P9BE] = {
898 .name = "yuva420p9be",
899 .nb_components = 4,
900 .log2_chroma_w = 1,
901 .log2_chroma_h = 1,
902 .comp = {
903 { 0, 2, 0, 0, 9 }, /* Y */
904 { 1, 2, 0, 0, 9 }, /* U */
905 { 2, 2, 0, 0, 9 }, /* V */
906 { 3, 2, 0, 0, 9 }, /* A */
907 },
908 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
909 },
910 [AV_PIX_FMT_YUVA420P9LE] = {
911 .name = "yuva420p9le",
912 .nb_components = 4,
913 .log2_chroma_w = 1,
914 .log2_chroma_h = 1,
915 .comp = {
916 { 0, 2, 0, 0, 9 }, /* Y */
917 { 1, 2, 0, 0, 9 }, /* U */
918 { 2, 2, 0, 0, 9 }, /* V */
919 { 3, 2, 0, 0, 9 }, /* A */
920 },
921 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
922 },
923 [AV_PIX_FMT_YUVA422P9BE] = {
924 .name = "yuva422p9be",
925 .nb_components = 4,
926 .log2_chroma_w = 1,
927 .log2_chroma_h = 0,
928 .comp = {
929 { 0, 2, 0, 0, 9 }, /* Y */
930 { 1, 2, 0, 0, 9 }, /* U */
931 { 2, 2, 0, 0, 9 }, /* V */
932 { 3, 2, 0, 0, 9 }, /* A */
933 },
934 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
935 },
936 [AV_PIX_FMT_YUVA422P9LE] = {
937 .name = "yuva422p9le",
938 .nb_components = 4,
939 .log2_chroma_w = 1,
940 .log2_chroma_h = 0,
941 .comp = {
942 { 0, 2, 0, 0, 9 }, /* Y */
943 { 1, 2, 0, 0, 9 }, /* U */
944 { 2, 2, 0, 0, 9 }, /* V */
945 { 3, 2, 0, 0, 9 }, /* A */
946 },
947 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
948 },
949 [AV_PIX_FMT_YUVA444P9BE] = {
950 .name = "yuva444p9be",
951 .nb_components = 4,
952 .log2_chroma_w = 0,
953 .log2_chroma_h = 0,
954 .comp = {
955 { 0, 2, 0, 0, 9 }, /* Y */
956 { 1, 2, 0, 0, 9 }, /* U */
957 { 2, 2, 0, 0, 9 }, /* V */
958 { 3, 2, 0, 0, 9 }, /* A */
959 },
960 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
961 },
962 [AV_PIX_FMT_YUVA444P9LE] = {
963 .name = "yuva444p9le",
964 .nb_components = 4,
965 .log2_chroma_w = 0,
966 .log2_chroma_h = 0,
967 .comp = {
968 { 0, 2, 0, 0, 9 }, /* Y */
969 { 1, 2, 0, 0, 9 }, /* U */
970 { 2, 2, 0, 0, 9 }, /* V */
971 { 3, 2, 0, 0, 9 }, /* A */
972 },
973 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
974 },
975 [AV_PIX_FMT_YUVA420P10BE] = {
976 .name = "yuva420p10be",
977 .nb_components = 4,
978 .log2_chroma_w = 1,
979 .log2_chroma_h = 1,
980 .comp = {
981 { 0, 2, 0, 0, 10 }, /* Y */
982 { 1, 2, 0, 0, 10 }, /* U */
983 { 2, 2, 0, 0, 10 }, /* V */
984 { 3, 2, 0, 0, 10 }, /* A */
985 },
986 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
987 },
988 [AV_PIX_FMT_YUVA420P10LE] = {
989 .name = "yuva420p10le",
990 .nb_components = 4,
991 .log2_chroma_w = 1,
992 .log2_chroma_h = 1,
993 .comp = {
994 { 0, 2, 0, 0, 10 }, /* Y */
995 { 1, 2, 0, 0, 10 }, /* U */
996 { 2, 2, 0, 0, 10 }, /* V */
997 { 3, 2, 0, 0, 10 }, /* A */
998 },
999 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1000 },
1001 [AV_PIX_FMT_YUVA422P10BE] = {
1002 .name = "yuva422p10be",
1003 .nb_components = 4,
1004 .log2_chroma_w = 1,
1005 .log2_chroma_h = 0,
1006 .comp = {
1007 { 0, 2, 0, 0, 10 }, /* Y */
1008 { 1, 2, 0, 0, 10 }, /* U */
1009 { 2, 2, 0, 0, 10 }, /* V */
1010 { 3, 2, 0, 0, 10 }, /* A */
1011 },
1012 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1013 },
1014 [AV_PIX_FMT_YUVA422P10LE] = {
1015 .name = "yuva422p10le",
1016 .nb_components = 4,
1017 .log2_chroma_w = 1,
1018 .log2_chroma_h = 0,
1019 .comp = {
1020 { 0, 2, 0, 0, 10 }, /* Y */
1021 { 1, 2, 0, 0, 10 }, /* U */
1022 { 2, 2, 0, 0, 10 }, /* V */
1023 { 3, 2, 0, 0, 10 }, /* A */
1024 },
1025 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1026 },
1027 [AV_PIX_FMT_YUVA444P10BE] = {
1028 .name = "yuva444p10be",
1029 .nb_components = 4,
1030 .log2_chroma_w = 0,
1031 .log2_chroma_h = 0,
1032 .comp = {
1033 { 0, 2, 0, 0, 10 }, /* Y */
1034 { 1, 2, 0, 0, 10 }, /* U */
1035 { 2, 2, 0, 0, 10 }, /* V */
1036 { 3, 2, 0, 0, 10 }, /* A */
1037 },
1038 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1039 },
1040 [AV_PIX_FMT_YUVA444P10LE] = {
1041 .name = "yuva444p10le",
1042 .nb_components = 4,
1043 .log2_chroma_w = 0,
1044 .log2_chroma_h = 0,
1045 .comp = {
1046 { 0, 2, 0, 0, 10 }, /* Y */
1047 { 1, 2, 0, 0, 10 }, /* U */
1048 { 2, 2, 0, 0, 10 }, /* V */
1049 { 3, 2, 0, 0, 10 }, /* A */
1050 },
1051 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1052 },
1053 [AV_PIX_FMT_YUVA420P16BE] = {
1054 .name = "yuva420p16be",
1055 .nb_components = 4,
1056 .log2_chroma_w = 1,
1057 .log2_chroma_h = 1,
1058 .comp = {
1059 { 0, 2, 0, 0, 16 }, /* Y */
1060 { 1, 2, 0, 0, 16 }, /* U */
1061 { 2, 2, 0, 0, 16 }, /* V */
1062 { 3, 2, 0, 0, 16 }, /* A */
1063 },
1064 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1065 },
1066 [AV_PIX_FMT_YUVA420P16LE] = {
1067 .name = "yuva420p16le",
1068 .nb_components = 4,
1069 .log2_chroma_w = 1,
1070 .log2_chroma_h = 1,
1071 .comp = {
1072 { 0, 2, 0, 0, 16 }, /* Y */
1073 { 1, 2, 0, 0, 16 }, /* U */
1074 { 2, 2, 0, 0, 16 }, /* V */
1075 { 3, 2, 0, 0, 16 }, /* A */
1076 },
1077 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1078 },
1079 [AV_PIX_FMT_YUVA422P16BE] = {
1080 .name = "yuva422p16be",
1081 .nb_components = 4,
1082 .log2_chroma_w = 1,
1083 .log2_chroma_h = 0,
1084 .comp = {
1085 { 0, 2, 0, 0, 16 }, /* Y */
1086 { 1, 2, 0, 0, 16 }, /* U */
1087 { 2, 2, 0, 0, 16 }, /* V */
1088 { 3, 2, 0, 0, 16 }, /* A */
1089 },
1090 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1091 },
1092 [AV_PIX_FMT_YUVA422P16LE] = {
1093 .name = "yuva422p16le",
1094 .nb_components = 4,
1095 .log2_chroma_w = 1,
1096 .log2_chroma_h = 0,
1097 .comp = {
1098 { 0, 2, 0, 0, 16 }, /* Y */
1099 { 1, 2, 0, 0, 16 }, /* U */
1100 { 2, 2, 0, 0, 16 }, /* V */
1101 { 3, 2, 0, 0, 16 }, /* A */
1102 },
1103 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1104 },
1105 [AV_PIX_FMT_YUVA444P16BE] = {
1106 .name = "yuva444p16be",
1107 .nb_components = 4,
1108 .log2_chroma_w = 0,
1109 .log2_chroma_h = 0,
1110 .comp = {
1111 { 0, 2, 0, 0, 16 }, /* Y */
1112 { 1, 2, 0, 0, 16 }, /* U */
1113 { 2, 2, 0, 0, 16 }, /* V */
1114 { 3, 2, 0, 0, 16 }, /* A */
1115 },
1116 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1117 },
1118 [AV_PIX_FMT_YUVA444P16LE] = {
1119 .name = "yuva444p16le",
1120 .nb_components = 4,
1121 .log2_chroma_w = 0,
1122 .log2_chroma_h = 0,
1123 .comp = {
1124 { 0, 2, 0, 0, 16 }, /* Y */
1125 { 1, 2, 0, 0, 16 }, /* U */
1126 { 2, 2, 0, 0, 16 }, /* V */
1127 { 3, 2, 0, 0, 16 }, /* A */
1128 },
1129 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
1130 },
1131 [AV_PIX_FMT_RGB48BE] = {
1132 .name = "rgb48be",
1133 .nb_components = 3,
1134 .log2_chroma_w = 0,
1135 .log2_chroma_h = 0,
1136 .comp = {
1137 { 0, 6, 0, 0, 16 }, /* R */
1138 { 0, 6, 2, 0, 16 }, /* G */
1139 { 0, 6, 4, 0, 16 }, /* B */
1140 },
1141 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
1142 },
1143 [AV_PIX_FMT_RGB48LE] = {
1144 .name = "rgb48le",
1145 .nb_components = 3,
1146 .log2_chroma_w = 0,
1147 .log2_chroma_h = 0,
1148 .comp = {
1149 { 0, 6, 0, 0, 16 }, /* R */
1150 { 0, 6, 2, 0, 16 }, /* G */
1151 { 0, 6, 4, 0, 16 }, /* B */
1152 },
1153 .flags = AV_PIX_FMT_FLAG_RGB,
1154 },
1155 [AV_PIX_FMT_RGBA64BE] = {
1156 .name = "rgba64be",
1157 .nb_components = 4,
1158 .log2_chroma_w = 0,
1159 .log2_chroma_h = 0,
1160 .comp = {
1161 { 0, 8, 0, 0, 16 }, /* R */
1162 { 0, 8, 2, 0, 16 }, /* G */
1163 { 0, 8, 4, 0, 16 }, /* B */
1164 { 0, 8, 6, 0, 16 }, /* A */
1165 },
1166 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1167 },
1168 [AV_PIX_FMT_RGBA64LE] = {
1169 .name = "rgba64le",
1170 .nb_components = 4,
1171 .log2_chroma_w = 0,
1172 .log2_chroma_h = 0,
1173 .comp = {
1174 { 0, 8, 0, 0, 16 }, /* R */
1175 { 0, 8, 2, 0, 16 }, /* G */
1176 { 0, 8, 4, 0, 16 }, /* B */
1177 { 0, 8, 6, 0, 16 }, /* A */
1178 },
1179 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1180 },
1181 [AV_PIX_FMT_RGB565BE] = {
1182 .name = "rgb565be",
1183 .nb_components = 3,
1184 .log2_chroma_w = 0,
1185 .log2_chroma_h = 0,
1186 .comp = {
1187 { 0, 2, -1, 3, 5 }, /* R */
1188 { 0, 2, 0, 5, 6 }, /* G */
1189 { 0, 2, 0, 0, 5 }, /* B */
1190 },
1191 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1192 },
1193 [AV_PIX_FMT_RGB565LE] = {
1194 .name = "rgb565le",
1195 .nb_components = 3,
1196 .log2_chroma_w = 0,
1197 .log2_chroma_h = 0,
1198 .comp = {
1199 { 0, 2, 1, 3, 5 }, /* R */
1200 { 0, 2, 0, 5, 6 }, /* G */
1201 { 0, 2, 0, 0, 5 }, /* B */
1202 },
1203 .flags = AV_PIX_FMT_FLAG_RGB,
1204 },
1205 [AV_PIX_FMT_RGB555BE] = {
1206 .name = "rgb555be",
1207 .nb_components = 3,
1208 .log2_chroma_w = 0,
1209 .log2_chroma_h = 0,
1210 .comp = {
1211 { 0, 2, -1, 2, 5 }, /* R */
1212 { 0, 2, 0, 5, 5 }, /* G */
1213 { 0, 2, 0, 0, 5 }, /* B */
1214 },
1215 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1216 },
1217 [AV_PIX_FMT_RGB555LE] = {
1218 .name = "rgb555le",
1219 .nb_components = 3,
1220 .log2_chroma_w = 0,
1221 .log2_chroma_h = 0,
1222 .comp = {
1223 { 0, 2, 1, 2, 5 }, /* R */
1224 { 0, 2, 0, 5, 5 }, /* G */
1225 { 0, 2, 0, 0, 5 }, /* B */
1226 },
1227 .flags = AV_PIX_FMT_FLAG_RGB,
1228 },
1229 [AV_PIX_FMT_RGB444BE] = {
1230 .name = "rgb444be",
1231 .nb_components = 3,
1232 .log2_chroma_w = 0,
1233 .log2_chroma_h = 0,
1234 .comp = {
1235 { 0, 2, -1, 0, 4 }, /* R */
1236 { 0, 2, 0, 4, 4 }, /* G */
1237 { 0, 2, 0, 0, 4 }, /* B */
1238 },
1239 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1240 },
1241 [AV_PIX_FMT_RGB444LE] = {
1242 .name = "rgb444le",
1243 .nb_components = 3,
1244 .log2_chroma_w = 0,
1245 .log2_chroma_h = 0,
1246 .comp = {
1247 { 0, 2, 1, 0, 4 }, /* R */
1248 { 0, 2, 0, 4, 4 }, /* G */
1249 { 0, 2, 0, 0, 4 }, /* B */
1250 },
1251 .flags = AV_PIX_FMT_FLAG_RGB,
1252 },
1253 [AV_PIX_FMT_BGR48BE] = {
1254 .name = "bgr48be",
1255 .nb_components = 3,
1256 .log2_chroma_w = 0,
1257 .log2_chroma_h = 0,
1258 .comp = {
1259 { 0, 6, 4, 0, 16 }, /* R */
1260 { 0, 6, 2, 0, 16 }, /* G */
1261 { 0, 6, 0, 0, 16 }, /* B */
1262 },
1263 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1264 },
1265 [AV_PIX_FMT_BGR48LE] = {
1266 .name = "bgr48le",
1267 .nb_components = 3,
1268 .log2_chroma_w = 0,
1269 .log2_chroma_h = 0,
1270 .comp = {
1271 { 0, 6, 4, 0, 16 }, /* R */
1272 { 0, 6, 2, 0, 16 }, /* G */
1273 { 0, 6, 0, 0, 16 }, /* B */
1274 },
1275 .flags = AV_PIX_FMT_FLAG_RGB,
1276 },
1277 [AV_PIX_FMT_BGRA64BE] = {
1278 .name = "bgra64be",
1279 .nb_components = 4,
1280 .log2_chroma_w = 0,
1281 .log2_chroma_h = 0,
1282 .comp = {
1283 { 0, 8, 4, 0, 16 }, /* R */
1284 { 0, 8, 2, 0, 16 }, /* G */
1285 { 0, 8, 0, 0, 16 }, /* B */
1286 { 0, 8, 6, 0, 16 }, /* A */
1287 },
1288 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1289 },
1290 [AV_PIX_FMT_BGRA64LE] = {
1291 .name = "bgra64le",
1292 .nb_components = 4,
1293 .log2_chroma_w = 0,
1294 .log2_chroma_h = 0,
1295 .comp = {
1296 { 0, 8, 4, 0, 16 }, /* R */
1297 { 0, 8, 2, 0, 16 }, /* G */
1298 { 0, 8, 0, 0, 16 }, /* B */
1299 { 0, 8, 6, 0, 16 }, /* A */
1300 },
1301 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1302 },
1303 [AV_PIX_FMT_BGR565BE] = {
1304 .name = "bgr565be",
1305 .nb_components = 3,
1306 .log2_chroma_w = 0,
1307 .log2_chroma_h = 0,
1308 .comp = {
1309 { 0, 2, 0, 0, 5 }, /* R */
1310 { 0, 2, 0, 5, 6 }, /* G */
1311 { 0, 2, -1, 3, 5 }, /* B */
1312 },
1313 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1314 },
1315 [AV_PIX_FMT_BGR565LE] = {
1316 .name = "bgr565le",
1317 .nb_components = 3,
1318 .log2_chroma_w = 0,
1319 .log2_chroma_h = 0,
1320 .comp = {
1321 { 0, 2, 0, 0, 5 }, /* R */
1322 { 0, 2, 0, 5, 6 }, /* G */
1323 { 0, 2, 1, 3, 5 }, /* B */
1324 },
1325 .flags = AV_PIX_FMT_FLAG_RGB,
1326 },
1327 [AV_PIX_FMT_BGR555BE] = {
1328 .name = "bgr555be",
1329 .nb_components = 3,
1330 .log2_chroma_w = 0,
1331 .log2_chroma_h = 0,
1332 .comp = {
1333 { 0, 2, 0, 0, 5 }, /* R */
1334 { 0, 2, 0, 5, 5 }, /* G */
1335 { 0, 2, -1, 2, 5 }, /* B */
1336 },
1337 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1338 },
1339 [AV_PIX_FMT_BGR555LE] = {
1340 .name = "bgr555le",
1341 .nb_components = 3,
1342 .log2_chroma_w = 0,
1343 .log2_chroma_h = 0,
1344 .comp = {
1345 { 0, 2, 0, 0, 5 }, /* R */
1346 { 0, 2, 0, 5, 5 }, /* G */
1347 { 0, 2, 1, 2, 5 }, /* B */
1348 },
1349 .flags = AV_PIX_FMT_FLAG_RGB,
1350 },
1351 [AV_PIX_FMT_BGR444BE] = {
1352 .name = "bgr444be",
1353 .nb_components = 3,
1354 .log2_chroma_w = 0,
1355 .log2_chroma_h = 0,
1356 .comp = {
1357 { 0, 2, 0, 0, 4 }, /* R */
1358 { 0, 2, 0, 4, 4 }, /* G */
1359 { 0, 2, -1, 0, 4 }, /* B */
1360 },
1361 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
1362 },
1363 [AV_PIX_FMT_BGR444LE] = {
1364 .name = "bgr444le",
1365 .nb_components = 3,
1366 .log2_chroma_w = 0,
1367 .log2_chroma_h = 0,
1368 .comp = {
1369 { 0, 2, 0, 0, 4 }, /* R */
1370 { 0, 2, 0, 4, 4 }, /* G */
1371 { 0, 2, 1, 0, 4 }, /* B */
1372 },
1373 .flags = AV_PIX_FMT_FLAG_RGB,
1374 },
1375 [AV_PIX_FMT_VAAPI] = {
1376 .name = "vaapi",
1377 .log2_chroma_w = 1,
1378 .log2_chroma_h = 1,
1379 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1380 },
1381 [AV_PIX_FMT_YUV420P9LE] = {
1382 .name = "yuv420p9le",
1383 .nb_components = 3,
1384 .log2_chroma_w = 1,
1385 .log2_chroma_h = 1,
1386 .comp = {
1387 { 0, 2, 0, 0, 9 }, /* Y */
1388 { 1, 2, 0, 0, 9 }, /* U */
1389 { 2, 2, 0, 0, 9 }, /* V */
1390 },
1391 .flags = AV_PIX_FMT_FLAG_PLANAR,
1392 },
1393 [AV_PIX_FMT_YUV420P9BE] = {
1394 .name = "yuv420p9be",
1395 .nb_components = 3,
1396 .log2_chroma_w = 1,
1397 .log2_chroma_h = 1,
1398 .comp = {
1399 { 0, 2, 0, 0, 9 }, /* Y */
1400 { 1, 2, 0, 0, 9 }, /* U */
1401 { 2, 2, 0, 0, 9 }, /* V */
1402 },
1403 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1404 },
1405 [AV_PIX_FMT_YUV420P10LE] = {
1406 .name = "yuv420p10le",
1407 .nb_components = 3,
1408 .log2_chroma_w = 1,
1409 .log2_chroma_h = 1,
1410 .comp = {
1411 { 0, 2, 0, 0, 10 }, /* Y */
1412 { 1, 2, 0, 0, 10 }, /* U */
1413 { 2, 2, 0, 0, 10 }, /* V */
1414 },
1415 .flags = AV_PIX_FMT_FLAG_PLANAR,
1416 },
1417 [AV_PIX_FMT_YUV420P10BE] = {
1418 .name = "yuv420p10be",
1419 .nb_components = 3,
1420 .log2_chroma_w = 1,
1421 .log2_chroma_h = 1,
1422 .comp = {
1423 { 0, 2, 0, 0, 10 }, /* Y */
1424 { 1, 2, 0, 0, 10 }, /* U */
1425 { 2, 2, 0, 0, 10 }, /* V */
1426 },
1427 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1428 },
1429 [AV_PIX_FMT_YUV420P12LE] = {
1430 .name = "yuv420p12le",
1431 .nb_components = 3,
1432 .log2_chroma_w = 1,
1433 .log2_chroma_h = 1,
1434 .comp = {
1435 { 0, 2, 0, 0, 12 }, /* Y */
1436 { 1, 2, 0, 0, 12 }, /* U */
1437 { 2, 2, 0, 0, 12 }, /* V */
1438 },
1439 .flags = AV_PIX_FMT_FLAG_PLANAR,
1440 },
1441 [AV_PIX_FMT_YUV420P12BE] = {
1442 .name = "yuv420p12be",
1443 .nb_components = 3,
1444 .log2_chroma_w = 1,
1445 .log2_chroma_h = 1,
1446 .comp = {
1447 { 0, 2, 0, 0, 12 }, /* Y */
1448 { 1, 2, 0, 0, 12 }, /* U */
1449 { 2, 2, 0, 0, 12 }, /* V */
1450 },
1451 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1452 },
1453 [AV_PIX_FMT_YUV420P14LE] = {
1454 .name = "yuv420p14le",
1455 .nb_components = 3,
1456 .log2_chroma_w = 1,
1457 .log2_chroma_h = 1,
1458 .comp = {
1459 { 0, 2, 0, 0, 14 }, /* Y */
1460 { 1, 2, 0, 0, 14 }, /* U */
1461 { 2, 2, 0, 0, 14 }, /* V */
1462 },
1463 .flags = AV_PIX_FMT_FLAG_PLANAR,
1464 },
1465 [AV_PIX_FMT_YUV420P14BE] = {
1466 .name = "yuv420p14be",
1467 .nb_components = 3,
1468 .log2_chroma_w = 1,
1469 .log2_chroma_h = 1,
1470 .comp = {
1471 { 0, 2, 0, 0, 14 }, /* Y */
1472 { 1, 2, 0, 0, 14 }, /* U */
1473 { 2, 2, 0, 0, 14 }, /* V */
1474 },
1475 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1476 },
1477 [AV_PIX_FMT_YUV420P16LE] = {
1478 .name = "yuv420p16le",
1479 .nb_components = 3,
1480 .log2_chroma_w = 1,
1481 .log2_chroma_h = 1,
1482 .comp = {
1483 { 0, 2, 0, 0, 16 }, /* Y */
1484 { 1, 2, 0, 0, 16 }, /* U */
1485 { 2, 2, 0, 0, 16 }, /* V */
1486 },
1487 .flags = AV_PIX_FMT_FLAG_PLANAR,
1488 },
1489 [AV_PIX_FMT_YUV420P16BE] = {
1490 .name = "yuv420p16be",
1491 .nb_components = 3,
1492 .log2_chroma_w = 1,
1493 .log2_chroma_h = 1,
1494 .comp = {
1495 { 0, 2, 0, 0, 16 }, /* Y */
1496 { 1, 2, 0, 0, 16 }, /* U */
1497 { 2, 2, 0, 0, 16 }, /* V */
1498 },
1499 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1500 },
1501 [AV_PIX_FMT_YUV422P9LE] = {
1502 .name = "yuv422p9le",
1503 .nb_components = 3,
1504 .log2_chroma_w = 1,
1505 .log2_chroma_h = 0,
1506 .comp = {
1507 { 0, 2, 0, 0, 9 }, /* Y */
1508 { 1, 2, 0, 0, 9 }, /* U */
1509 { 2, 2, 0, 0, 9 }, /* V */
1510 },
1511 .flags = AV_PIX_FMT_FLAG_PLANAR,
1512 },
1513 [AV_PIX_FMT_YUV422P9BE] = {
1514 .name = "yuv422p9be",
1515 .nb_components = 3,
1516 .log2_chroma_w = 1,
1517 .log2_chroma_h = 0,
1518 .comp = {
1519 { 0, 2, 0, 0, 9 }, /* Y */
1520 { 1, 2, 0, 0, 9 }, /* U */
1521 { 2, 2, 0, 0, 9 }, /* V */
1522 },
1523 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1524 },
1525 [AV_PIX_FMT_YUV422P10LE] = {
1526 .name = "yuv422p10le",
1527 .nb_components = 3,
1528 .log2_chroma_w = 1,
1529 .log2_chroma_h = 0,
1530 .comp = {
1531 { 0, 2, 0, 0, 10 }, /* Y */
1532 { 1, 2, 0, 0, 10 }, /* U */
1533 { 2, 2, 0, 0, 10 }, /* V */
1534 },
1535 .flags = AV_PIX_FMT_FLAG_PLANAR,
1536 },
1537 [AV_PIX_FMT_YUV422P10BE] = {
1538 .name = "yuv422p10be",
1539 .nb_components = 3,
1540 .log2_chroma_w = 1,
1541 .log2_chroma_h = 0,
1542 .comp = {
1543 { 0, 2, 0, 0, 10 }, /* Y */
1544 { 1, 2, 0, 0, 10 }, /* U */
1545 { 2, 2, 0, 0, 10 }, /* V */
1546 },
1547 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1548 },
1549 [AV_PIX_FMT_YUV422P12LE] = {
1550 .name = "yuv422p12le",
1551 .nb_components = 3,
1552 .log2_chroma_w = 1,
1553 .log2_chroma_h = 0,
1554 .comp = {
1555 { 0, 2, 0, 0, 12 }, /* Y */
1556 { 1, 2, 0, 0, 12 }, /* U */
1557 { 2, 2, 0, 0, 12 }, /* V */
1558 },
1559 .flags = AV_PIX_FMT_FLAG_PLANAR,
1560 },
1561 [AV_PIX_FMT_YUV422P12BE] = {
1562 .name = "yuv422p12be",
1563 .nb_components = 3,
1564 .log2_chroma_w = 1,
1565 .log2_chroma_h = 0,
1566 .comp = {
1567 { 0, 2, 0, 0, 12 }, /* Y */
1568 { 1, 2, 0, 0, 12 }, /* U */
1569 { 2, 2, 0, 0, 12 }, /* V */
1570 },
1571 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1572 },
1573 [AV_PIX_FMT_YUV422P14LE] = {
1574 .name = "yuv422p14le",
1575 .nb_components = 3,
1576 .log2_chroma_w = 1,
1577 .log2_chroma_h = 0,
1578 .comp = {
1579 { 0, 2, 0, 0, 14 }, /* Y */
1580 { 1, 2, 0, 0, 14 }, /* U */
1581 { 2, 2, 0, 0, 14 }, /* V */
1582 },
1583 .flags = AV_PIX_FMT_FLAG_PLANAR,
1584 },
1585 [AV_PIX_FMT_YUV422P14BE] = {
1586 .name = "yuv422p14be",
1587 .nb_components = 3,
1588 .log2_chroma_w = 1,
1589 .log2_chroma_h = 0,
1590 .comp = {
1591 { 0, 2, 0, 0, 14 }, /* Y */
1592 { 1, 2, 0, 0, 14 }, /* U */
1593 { 2, 2, 0, 0, 14 }, /* V */
1594 },
1595 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1596 },
1597 [AV_PIX_FMT_YUV422P16LE] = {
1598 .name = "yuv422p16le",
1599 .nb_components = 3,
1600 .log2_chroma_w = 1,
1601 .log2_chroma_h = 0,
1602 .comp = {
1603 { 0, 2, 0, 0, 16 }, /* Y */
1604 { 1, 2, 0, 0, 16 }, /* U */
1605 { 2, 2, 0, 0, 16 }, /* V */
1606 },
1607 .flags = AV_PIX_FMT_FLAG_PLANAR,
1608 },
1609 [AV_PIX_FMT_YUV422P16BE] = {
1610 .name = "yuv422p16be",
1611 .nb_components = 3,
1612 .log2_chroma_w = 1,
1613 .log2_chroma_h = 0,
1614 .comp = {
1615 { 0, 2, 0, 0, 16 }, /* Y */
1616 { 1, 2, 0, 0, 16 }, /* U */
1617 { 2, 2, 0, 0, 16 }, /* V */
1618 },
1619 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1620 },
1621 [AV_PIX_FMT_YUV444P16LE] = {
1622 .name = "yuv444p16le",
1623 .nb_components = 3,
1624 .log2_chroma_w = 0,
1625 .log2_chroma_h = 0,
1626 .comp = {
1627 { 0, 2, 0, 0, 16 }, /* Y */
1628 { 1, 2, 0, 0, 16 }, /* U */
1629 { 2, 2, 0, 0, 16 }, /* V */
1630 },
1631 .flags = AV_PIX_FMT_FLAG_PLANAR,
1632 },
1633 [AV_PIX_FMT_YUV444P16BE] = {
1634 .name = "yuv444p16be",
1635 .nb_components = 3,
1636 .log2_chroma_w = 0,
1637 .log2_chroma_h = 0,
1638 .comp = {
1639 { 0, 2, 0, 0, 16 }, /* Y */
1640 { 1, 2, 0, 0, 16 }, /* U */
1641 { 2, 2, 0, 0, 16 }, /* V */
1642 },
1643 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1644 },
1645 [AV_PIX_FMT_YUV444P10LE] = {
1646 .name = "yuv444p10le",
1647 .nb_components = 3,
1648 .log2_chroma_w = 0,
1649 .log2_chroma_h = 0,
1650 .comp = {
1651 { 0, 2, 0, 0, 10 }, /* Y */
1652 { 1, 2, 0, 0, 10 }, /* U */
1653 { 2, 2, 0, 0, 10 }, /* V */
1654 },
1655 .flags = AV_PIX_FMT_FLAG_PLANAR,
1656 },
1657 [AV_PIX_FMT_YUV444P10BE] = {
1658 .name = "yuv444p10be",
1659 .nb_components = 3,
1660 .log2_chroma_w = 0,
1661 .log2_chroma_h = 0,
1662 .comp = {
1663 { 0, 2, 0, 0, 10 }, /* Y */
1664 { 1, 2, 0, 0, 10 }, /* U */
1665 { 2, 2, 0, 0, 10 }, /* V */
1666 },
1667 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1668 },
1669 [AV_PIX_FMT_YUV444P9LE] = {
1670 .name = "yuv444p9le",
1671 .nb_components = 3,
1672 .log2_chroma_w = 0,
1673 .log2_chroma_h = 0,
1674 .comp = {
1675 { 0, 2, 0, 0, 9 }, /* Y */
1676 { 1, 2, 0, 0, 9 }, /* U */
1677 { 2, 2, 0, 0, 9 }, /* V */
1678 },
1679 .flags = AV_PIX_FMT_FLAG_PLANAR,
1680 },
1681 [AV_PIX_FMT_YUV444P9BE] = {
1682 .name = "yuv444p9be",
1683 .nb_components = 3,
1684 .log2_chroma_w = 0,
1685 .log2_chroma_h = 0,
1686 .comp = {
1687 { 0, 2, 0, 0, 9 }, /* Y */
1688 { 1, 2, 0, 0, 9 }, /* U */
1689 { 2, 2, 0, 0, 9 }, /* V */
1690 },
1691 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1692 },
1693 [AV_PIX_FMT_YUV444P12LE] = {
1694 .name = "yuv444p12le",
1695 .nb_components = 3,
1696 .log2_chroma_w = 0,
1697 .log2_chroma_h = 0,
1698 .comp = {
1699 { 0, 2, 0, 0, 12 }, /* Y */
1700 { 1, 2, 0, 0, 12 }, /* U */
1701 { 2, 2, 0, 0, 12 }, /* V */
1702 },
1703 .flags = AV_PIX_FMT_FLAG_PLANAR,
1704 },
1705 [AV_PIX_FMT_YUV444P12BE] = {
1706 .name = "yuv444p12be",
1707 .nb_components = 3,
1708 .log2_chroma_w = 0,
1709 .log2_chroma_h = 0,
1710 .comp = {
1711 { 0, 2, 0, 0, 12 }, /* Y */
1712 { 1, 2, 0, 0, 12 }, /* U */
1713 { 2, 2, 0, 0, 12 }, /* V */
1714 },
1715 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1716 },
1717 [AV_PIX_FMT_YUV444P14LE] = {
1718 .name = "yuv444p14le",
1719 .nb_components = 3,
1720 .log2_chroma_w = 0,
1721 .log2_chroma_h = 0,
1722 .comp = {
1723 { 0, 2, 0, 0, 14 }, /* Y */
1724 { 1, 2, 0, 0, 14 }, /* U */
1725 { 2, 2, 0, 0, 14 }, /* V */
1726 },
1727 .flags = AV_PIX_FMT_FLAG_PLANAR,
1728 },
1729 [AV_PIX_FMT_YUV444P14BE] = {
1730 .name = "yuv444p14be",
1731 .nb_components = 3,
1732 .log2_chroma_w = 0,
1733 .log2_chroma_h = 0,
1734 .comp = {
1735 { 0, 2, 0, 0, 14 }, /* Y */
1736 { 1, 2, 0, 0, 14 }, /* U */
1737 { 2, 2, 0, 0, 14 }, /* V */
1738 },
1739 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
1740 },
1741 [AV_PIX_FMT_D3D11VA_VLD] = {
1742 .name = "d3d11va_vld",
1743 .log2_chroma_w = 1,
1744 .log2_chroma_h = 1,
1745 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1746 },
1747 [AV_PIX_FMT_DXVA2_VLD] = {
1748 .name = "dxva2_vld",
1749 .log2_chroma_w = 1,
1750 .log2_chroma_h = 1,
1751 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1752 },
1753 [AV_PIX_FMT_YA8] = {
1754 .name = "ya8",
1755 .nb_components = 2,
1756 .comp = {
1757 { 0, 2, 0, 0, 8 }, /* Y */
1758 { 0, 2, 1, 0, 8 }, /* A */
1759 },
1760 .flags = AV_PIX_FMT_FLAG_ALPHA,
1761 .alias = "gray8a",
1762 },
1763 [AV_PIX_FMT_YA16LE] = {
1764 .name = "ya16le",
1765 .nb_components = 2,
1766 .comp = {
1767 { 0, 4, 0, 0, 16 }, /* Y */
1768 { 0, 4, 2, 0, 16 }, /* A */
1769 },
1770 .flags = AV_PIX_FMT_FLAG_ALPHA,
1771 },
1772 [AV_PIX_FMT_YA16BE] = {
1773 .name = "ya16be",
1774 .nb_components = 2,
1775 .comp = {
1776 { 0, 4, 0, 0, 16 }, /* Y */
1777 { 0, 4, 2, 0, 16 }, /* A */
1778 },
1779 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
1780 },
1781 [AV_PIX_FMT_VIDEOTOOLBOX] = {
1782 .name = "videotoolbox_vld",
1783 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1784 },
1785 [AV_PIX_FMT_GBRP] = {
1786 .name = "gbrp",
1787 .nb_components = 3,
1788 .log2_chroma_w = 0,
1789 .log2_chroma_h = 0,
1790 .comp = {
1791 { 2, 1, 0, 0, 8 }, /* R */
1792 { 0, 1, 0, 0, 8 }, /* G */
1793 { 1, 1, 0, 0, 8 }, /* B */
1794 },
1795 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1796 },
1797 [AV_PIX_FMT_GBRP9LE] = {
1798 .name = "gbrp9le",
1799 .nb_components = 3,
1800 .log2_chroma_w = 0,
1801 .log2_chroma_h = 0,
1802 .comp = {
1803 { 2, 2, 0, 0, 9 }, /* R */
1804 { 0, 2, 0, 0, 9 }, /* G */
1805 { 1, 2, 0, 0, 9 }, /* B */
1806 },
1807 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1808 },
1809 [AV_PIX_FMT_GBRP9BE] = {
1810 .name = "gbrp9be",
1811 .nb_components = 3,
1812 .log2_chroma_w = 0,
1813 .log2_chroma_h = 0,
1814 .comp = {
1815 { 2, 2, 0, 0, 9 }, /* R */
1816 { 0, 2, 0, 0, 9 }, /* G */
1817 { 1, 2, 0, 0, 9 }, /* B */
1818 },
1819 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1820 },
1821 [AV_PIX_FMT_GBRP10LE] = {
1822 .name = "gbrp10le",
1823 .nb_components = 3,
1824 .log2_chroma_w = 0,
1825 .log2_chroma_h = 0,
1826 .comp = {
1827 { 2, 2, 0, 0, 10 }, /* R */
1828 { 0, 2, 0, 0, 10 }, /* G */
1829 { 1, 2, 0, 0, 10 }, /* B */
1830 },
1831 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1832 },
1833 [AV_PIX_FMT_GBRP10BE] = {
1834 .name = "gbrp10be",
1835 .nb_components = 3,
1836 .log2_chroma_w = 0,
1837 .log2_chroma_h = 0,
1838 .comp = {
1839 { 2, 2, 0, 0, 10 }, /* R */
1840 { 0, 2, 0, 0, 10 }, /* G */
1841 { 1, 2, 0, 0, 10 }, /* B */
1842 },
1843 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1844 },
1845 [AV_PIX_FMT_GBRP12LE] = {
1846 .name = "gbrp12le",
1847 .nb_components = 3,
1848 .log2_chroma_w = 0,
1849 .log2_chroma_h = 0,
1850 .comp = {
1851 { 2, 2, 0, 0, 12 }, /* R */
1852 { 0, 2, 0, 0, 12 }, /* G */
1853 { 1, 2, 0, 0, 12 }, /* B */
1854 },
1855 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1856 },
1857 [AV_PIX_FMT_GBRP12BE] = {
1858 .name = "gbrp12be",
1859 .nb_components = 3,
1860 .log2_chroma_w = 0,
1861 .log2_chroma_h = 0,
1862 .comp = {
1863 { 2, 2, 0, 0, 12 }, /* R */
1864 { 0, 2, 0, 0, 12 }, /* G */
1865 { 1, 2, 0, 0, 12 }, /* B */
1866 },
1867 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1868 },
1869 [AV_PIX_FMT_GBRP14LE] = {
1870 .name = "gbrp14le",
1871 .nb_components = 3,
1872 .log2_chroma_w = 0,
1873 .log2_chroma_h = 0,
1874 .comp = {
1875 { 2, 2, 0, 0, 14 }, /* R */
1876 { 0, 2, 0, 0, 14 }, /* G */
1877 { 1, 2, 0, 0, 14 }, /* B */
1878 },
1879 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1880 },
1881 [AV_PIX_FMT_GBRP14BE] = {
1882 .name = "gbrp14be",
1883 .nb_components = 3,
1884 .log2_chroma_w = 0,
1885 .log2_chroma_h = 0,
1886 .comp = {
1887 { 2, 2, 0, 0, 14 }, /* R */
1888 { 0, 2, 0, 0, 14 }, /* G */
1889 { 1, 2, 0, 0, 14 }, /* B */
1890 },
1891 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1892 },
1893 [AV_PIX_FMT_GBRP16LE] = {
1894 .name = "gbrp16le",
1895 .nb_components = 3,
1896 .log2_chroma_w = 0,
1897 .log2_chroma_h = 0,
1898 .comp = {
1899 { 2, 2, 0, 0, 16 }, /* R */
1900 { 0, 2, 0, 0, 16 }, /* G */
1901 { 1, 2, 0, 0, 16 }, /* B */
1902 },
1903 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1904 },
1905 [AV_PIX_FMT_GBRP16BE] = {
1906 .name = "gbrp16be",
1907 .nb_components = 3,
1908 .log2_chroma_w = 0,
1909 .log2_chroma_h = 0,
1910 .comp = {
1911 { 2, 2, 0, 0, 16 }, /* R */
1912 { 0, 2, 0, 0, 16 }, /* G */
1913 { 1, 2, 0, 0, 16 }, /* B */
1914 },
1915 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
1916 },
1917 [AV_PIX_FMT_GBRAP] = {
1918 .name = "gbrap",
1919 .nb_components = 4,
1920 .log2_chroma_w = 0,
1921 .log2_chroma_h = 0,
1922 .comp = {
1923 { 2, 1, 0, 0, 8 }, /* R */
1924 { 0, 1, 0, 0, 8 }, /* G */
1925 { 1, 1, 0, 0, 8 }, /* B */
1926 { 3, 1, 0, 0, 8 }, /* A */
1927 },
1928 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
1929 AV_PIX_FMT_FLAG_ALPHA,
1930 },
1931 [AV_PIX_FMT_GBRAP16LE] = {
1932 .name = "gbrap16le",
1933 .nb_components = 4,
1934 .log2_chroma_w = 0,
1935 .log2_chroma_h = 0,
1936 .comp = {
1937 { 2, 2, 0, 0, 16 }, /* R */
1938 { 0, 2, 0, 0, 16 }, /* G */
1939 { 1, 2, 0, 0, 16 }, /* B */
1940 { 3, 2, 0, 0, 16 }, /* A */
1941 },
1942 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB |
1943 AV_PIX_FMT_FLAG_ALPHA,
1944 },
1945 [AV_PIX_FMT_GBRAP16BE] = {
1946 .name = "gbrap16be",
1947 .nb_components = 4,
1948 .log2_chroma_w = 0,
1949 .log2_chroma_h = 0,
1950 .comp = {
1951 { 2, 2, 0, 0, 16 }, /* R */
1952 { 0, 2, 0, 0, 16 }, /* G */
1953 { 1, 2, 0, 0, 16 }, /* B */
1954 { 3, 2, 0, 0, 16 }, /* A */
1955 },
1956 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
1957 AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
1958 },
1959 [AV_PIX_FMT_VDPAU] = {
1960 .name = "vdpau",
1961 .log2_chroma_w = 1,
1962 .log2_chroma_h = 1,
1963 .flags = AV_PIX_FMT_FLAG_HWACCEL,
1964 },
1965 [AV_PIX_FMT_XYZ12LE] = {
1966 .name = "xyz12le",
1967 .nb_components = 3,
1968 .log2_chroma_w = 0,
1969 .log2_chroma_h = 0,
1970 .comp = {
1971 { 0, 6, 0, 4, 12 }, /* X */
1972 { 0, 6, 2, 4, 12 }, /* Y */
1973 { 0, 6, 4, 4, 12 }, /* Z */
1974 },
1975 .flags = AV_PIX_FMT_FLAG_XYZ,
1976 },
1977 [AV_PIX_FMT_XYZ12BE] = {
1978 .name = "xyz12be",
1979 .nb_components = 3,
1980 .log2_chroma_w = 0,
1981 .log2_chroma_h = 0,
1982 .comp = {
1983 { 0, 6, 0, 4, 12 }, /* X */
1984 { 0, 6, 2, 4, 12 }, /* Y */
1985 { 0, 6, 4, 4, 12 }, /* Z */
1986 },
1987 .flags = AV_PIX_FMT_FLAG_XYZ | AV_PIX_FMT_FLAG_BE,
1988 },
1989
1990 #define BAYER8_DESC_COMMON \
1991 .nb_components= 3, \
1992 .log2_chroma_w= 0, \
1993 .log2_chroma_h= 0, \
1994 .comp = { \
1995 { 0, 1, 0, 0, 2 }, \
1996 { 0, 1, 0, 0, 4 }, \
1997 { 0, 1, 0, 0, 2 }, \
1998 }, \
1999
2000 #define BAYER16_DESC_COMMON \
2001 .nb_components= 3, \
2002 .log2_chroma_w= 0, \
2003 .log2_chroma_h= 0, \
2004 .comp = { \
2005 { 0, 2, 0, 0, 4 }, \
2006 { 0, 2, 0, 0, 8 }, \
2007 { 0, 2, 0, 0, 4 }, \
2008 }, \
2009
2010 [AV_PIX_FMT_BAYER_BGGR8] = {
2011 .name = "bayer_bggr8",
2012 BAYER8_DESC_COMMON
2013 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2014 },
2015 [AV_PIX_FMT_BAYER_BGGR16LE] = {
2016 .name = "bayer_bggr16le",
2017 BAYER16_DESC_COMMON
2018 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2019 },
2020 [AV_PIX_FMT_BAYER_BGGR16BE] = {
2021 .name = "bayer_bggr16be",
2022 BAYER16_DESC_COMMON
2023 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2024 },
2025 [AV_PIX_FMT_BAYER_RGGB8] = {
2026 .name = "bayer_rggb8",
2027 BAYER8_DESC_COMMON
2028 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2029 },
2030 [AV_PIX_FMT_BAYER_RGGB16LE] = {
2031 .name = "bayer_rggb16le",
2032 BAYER16_DESC_COMMON
2033 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2034 },
2035 [AV_PIX_FMT_BAYER_RGGB16BE] = {
2036 .name = "bayer_rggb16be",
2037 BAYER16_DESC_COMMON
2038 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2039 },
2040 [AV_PIX_FMT_BAYER_GBRG8] = {
2041 .name = "bayer_gbrg8",
2042 BAYER8_DESC_COMMON
2043 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2044 },
2045 [AV_PIX_FMT_BAYER_GBRG16LE] = {
2046 .name = "bayer_gbrg16le",
2047 BAYER16_DESC_COMMON
2048 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2049 },
2050 [AV_PIX_FMT_BAYER_GBRG16BE] = {
2051 .name = "bayer_gbrg16be",
2052 BAYER16_DESC_COMMON
2053 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2054 },
2055 [AV_PIX_FMT_BAYER_GRBG8] = {
2056 .name = "bayer_grbg8",
2057 BAYER8_DESC_COMMON
2058 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2059 },
2060 [AV_PIX_FMT_BAYER_GRBG16LE] = {
2061 .name = "bayer_grbg16le",
2062 BAYER16_DESC_COMMON
2063 .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2064 },
2065 [AV_PIX_FMT_BAYER_GRBG16BE] = {
2066 .name = "bayer_grbg16be",
2067 BAYER16_DESC_COMMON
2068 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER,
2069 },
2070 [AV_PIX_FMT_NV16] = {
2071 .name = "nv16",
2072 .nb_components = 3,
2073 .log2_chroma_w = 1,
2074 .log2_chroma_h = 0,
2075 .comp = {
2076 { 0, 1, 0, 0, 8 }, /* Y */
2077 { 1, 2, 0, 0, 8 }, /* U */
2078 { 1, 2, 1, 0, 8 }, /* V */
2079 },
2080 .flags = AV_PIX_FMT_FLAG_PLANAR,
2081 },
2082 [AV_PIX_FMT_NV20LE] = {
2083 .name = "nv20le",
2084 .nb_components = 3,
2085 .log2_chroma_w = 1,
2086 .log2_chroma_h = 0,
2087 .comp = {
2088 { 0, 2, 0, 0, 10 }, /* Y */
2089 { 1, 4, 0, 0, 10 }, /* U */
2090 { 1, 4, 2, 0, 10 }, /* V */
2091 },
2092 .flags = AV_PIX_FMT_FLAG_PLANAR,
2093 },
2094 [AV_PIX_FMT_NV20BE] = {
2095 .name = "nv20be",
2096 .nb_components = 3,
2097 .log2_chroma_w = 1,
2098 .log2_chroma_h = 0,
2099 .comp = {
2100 { 0, 2, 0, 0, 10 }, /* Y */
2101 { 1, 4, 0, 0, 10 }, /* U */
2102 { 1, 4, 2, 0, 10 }, /* V */
2103 },
2104 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
2105 },
2106 [AV_PIX_FMT_QSV] = {
2107 .name = "qsv",
2108 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2109 },
2110 [AV_PIX_FMT_MEDIACODEC] = {
2111 .name = "mediacodec",
2112 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2113 },
2114 [AV_PIX_FMT_MMAL] = {
2115 .name = "mmal",
2116 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2117 },
2118 [AV_PIX_FMT_CUDA] = {
2119 .name = "cuda",
2120 .flags = AV_PIX_FMT_FLAG_HWACCEL,
2121 },
2122 [AV_PIX_FMT_AYUV64LE] = {
2123 .name = "ayuv64le",
2124 .nb_components = 4,
2125 .log2_chroma_w = 0,
2126 .log2_chroma_h = 0,
2127 .comp = {
2128 { 0, 8, 2, 0, 16 }, /* Y */
2129 { 0, 8, 4, 0, 16 }, /* U */
2130 { 0, 8, 6, 0, 16 }, /* V */
2131 { 0, 8, 0, 0, 16 }, /* A */
2132 },
2133 .flags = AV_PIX_FMT_FLAG_ALPHA,
2134 },
2135 [AV_PIX_FMT_AYUV64BE] = {
2136 .name = "ayuv64be",
2137 .nb_components = 4,
2138 .log2_chroma_w = 0,
2139 .log2_chroma_h = 0,
2140 .comp = {
2141 { 0, 8, 2, 0, 16 }, /* Y */
2142 { 0, 8, 4, 0, 16 }, /* U */
2143 { 0, 8, 6, 0, 16 }, /* V */
2144 { 0, 8, 0, 0, 16 }, /* A */
2145 },
2146 .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
2147 },
2148 [AV_PIX_FMT_P010LE] = {
2149 .name = "p010le",
2150 .nb_components = 3,
2151 .log2_chroma_w = 1,
2152 .log2_chroma_h = 1,
2153 .comp = {
2154 { 0, 2, 0, 6, 10 }, /* Y */
2155 { 1, 4, 0, 6, 10 }, /* U */
2156 { 1, 4, 2, 6, 10 }, /* V */
2157 },
2158 .flags = AV_PIX_FMT_FLAG_PLANAR,
2159 },
2160 [AV_PIX_FMT_P010BE] = {
2161 .name = "p010be",
2162 .nb_components = 3,
2163 .log2_chroma_w = 1,
2164 .log2_chroma_h = 1,
2165 .comp = {
2166 { 0, 2, 0, 6, 10 }, /* Y */
2167 { 1, 4, 0, 6, 10 }, /* U */
2168 { 1, 4, 2, 6, 10 }, /* V */
2169 },
2170 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
2171 },
2172 [AV_PIX_FMT_P012LE] = {
2173 .name = "p012le",
2174 .nb_components = 3,
2175 .log2_chroma_w = 1,
2176 .log2_chroma_h = 1,
2177 .comp = {
2178 { 0, 2, 0, 4, 12 }, /* Y */
2179 { 1, 4, 0, 4, 12 }, /* U */
2180 { 1, 4, 2, 4, 12 }, /* V */
2181 },
2182 .flags = AV_PIX_FMT_FLAG_PLANAR,
2183 },
2184 [AV_PIX_FMT_P012BE] = {
2185 .name = "p012be",
2186 .nb_components = 3,
2187 .log2_chroma_w = 1,
2188 .log2_chroma_h = 1,
2189 .comp = {
2190 { 0, 2, 0, 4, 12 }, /* Y */
2191 { 1, 4, 0, 4, 12 }, /* U */
2192 { 1, 4, 2, 4, 12 }, /* V */
2193 },
2194 .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE,
2195 },
2196