FFmpeg
pixdesc.c
Go to the documentation of this file.
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 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 {
39  int plane = comp.plane;
40  int depth = comp.depth;
41  unsigned mask = (1ULL << depth) - 1;
42  int shift = comp.shift;
43  int step = comp.step;
44  int flags = desc->flags;
45  uint16_t *dst16 = dst;
46  uint32_t *dst32 = dst;
47 
49  if (depth == 10) {
50  // Assume all channels are packed into a 32bit value
51  const uint8_t *byte_p = data[plane] + y * linesize[plane];
52  const uint32_t *p = (uint32_t *)byte_p;
53 
54  while (w--) {
55  int val = AV_RB32(p);
56  val = (val >> comp.offset) & mask;
57  if (read_pal_component)
58  val = data[1][4*val + c];
59  if (dst_element_size == 4) *dst32++ = val;
60  else *dst16++ = val;
61  p++;
62  }
63  } else {
64  int skip = x * step + comp.offset;
65  const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
66  int shift = 8 - depth - (skip & 7);
67 
68  while (w--) {
69  int val = (*p >> shift) & mask;
70  if (read_pal_component)
71  val = data[1][4*val + c];
72  shift -= step;
73  p -= shift >> 3;
74  shift &= 7;
75  if (dst_element_size == 4) *dst32++ = val;
76  else *dst16++ = val;
77  }
78  }
79  } else {
80  const uint8_t *p = data[plane] + y * linesize[plane] +
81  x * step + comp.offset;
82  int is_8bit = shift + depth <= 8;
83  int is_16bit= shift + depth <=16;
84 
85  if (is_8bit)
86  p += !!(flags & AV_PIX_FMT_FLAG_BE);
87 
88  while (w--) {
89  unsigned val;
90  if (is_8bit) val = *p;
91  else if(is_16bit) val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p);
92  else val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB32(p) : AV_RL32(p);
93  val = (val >> shift) & mask;
94  if (read_pal_component)
95  val = data[1][4 * val + c];
96  p += step;
97  if (dst_element_size == 4) *dst32++ = val;
98  else *dst16++ = val;
99  }
100  }
101 }
102 
103 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  av_read_image_line2(dst, data, linesize, desc,x, y, c, w,
110  read_pal_component,
111  2);
112 }
113 
114 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  AVComponentDescriptor comp = desc->comp[c];
120  int plane = comp.plane;
121  int depth = comp.depth;
122  int step = comp.step;
123  int flags = desc->flags;
124  const uint32_t *src32 = src;
125  const uint16_t *src16 = src;
126 
128  if (depth == 10) {
129  // Assume all channels are packed into a 32bit value
130  const uint8_t *byte_p = data[plane] + y * linesize[plane];
131  uint32_t *p = (uint32_t *)byte_p;
132  int offset = comp.offset;
133  uint32_t mask = ((1ULL << depth) - 1) << offset;
134 
135  while (w--) {
136  uint16_t val = src_element_size == 4 ? *src32++ : *src16++;
137  AV_WB32(p, (AV_RB32(p) & ~mask) | (val << offset));
138  p++;
139  }
140  } else {
141  int skip = x * step + comp.offset;
142  uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
143  int shift = 8 - depth - (skip & 7);
144 
145  while (w--) {
146  *p |= (src_element_size == 4 ? *src32++ : *src16++) << shift;
147  shift -= step;
148  p -= shift >> 3;
149  shift &= 7;
150  }
151  }
152  } else {
153  int shift = comp.shift;
154  uint8_t *p = data[plane] + y * linesize[plane] +
155  x * step + comp.offset;
156 
157  if (shift + depth <= 8) {
158  p += !!(flags & AV_PIX_FMT_FLAG_BE);
159  while (w--) {
160  *p |= ((src_element_size == 4 ? *src32++ : *src16++) << shift);
161  p += step;
162  }
163  } else {
164  while (w--) {
165  unsigned s = (src_element_size == 4 ? *src32++ : *src16++);
166  if (shift + depth <= 16) {
167  if (flags & AV_PIX_FMT_FLAG_BE) {
168  uint16_t val = AV_RB16(p) | (s << shift);
169  AV_WB16(p, val);
170  } else {
171  uint16_t val = AV_RL16(p) | (s << shift);
172  AV_WL16(p, val);
173  }
174  } else {
175  if (flags & AV_PIX_FMT_FLAG_BE) {
176  uint32_t val = AV_RB32(p) | (s << shift);
177  AV_WB32(p, val);
178  } else {
179  uint32_t val = AV_RL32(p) | (s << shift);
180  AV_WL32(p, val);
181  }
182  }
183  p += step;
184  }
185  }
186  }
187 }
188 
189 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  av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2);
195 }
196 
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  },
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  },
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  },
302  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
508  },
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  },
544  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
833  },
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  },
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  },
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  },
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  },
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  },
896  },
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  },
909  },
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  },
922  },
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  },
935  },
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  },
948  },
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  },
961  },
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  },
974  },
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  },
987  },
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  },
1000  },
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  },
1013  },
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  },
1026  },
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  },
1039  },
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  },
1052  },
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  },
1065  },
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  },
1078  },
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  },
1091  },
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  },
1104  },
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  },
1117  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
1404  },
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  },
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  },
1428  },
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  },
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  },
1452  },
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  },
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  },
1476  },
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  },
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  },
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  },
1524  },
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  },
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  },
1548  },
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  },
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  },
1572  },
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  },
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  },
1596  },
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  },
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  },
1620  },
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  },
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  },
1644  },
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  },
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  },
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  },
1692  },
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  },
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  },
1716  },
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  },
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  },
1740  },
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  },
1780  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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  },
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 
2011  .name = "bayer_bggr8",
2014  },
2016  .name = "bayer_bggr16le",
2019  },
2021  .name = "bayer_bggr16be",
2024  },
2026  .name = "bayer_rggb8",
2029  },
2031  .name = "bayer_rggb16le",
2034  },
2036  .name = "bayer_rggb16be",
2039  },
2041  .name = "bayer_gbrg8",
2044  },
2046  .name = "bayer_gbrg16le",
2049  },
2051  .name = "bayer_gbrg16be",
2054  },
2056  .name = "bayer_grbg8",
2059  },
2061  .name = "bayer_grbg16le",
2064  },
2066  .name = "bayer_grbg16be",
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  },
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  },
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  },
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  },
2195  },
2196  [AV_PIX_FMT_P016LE] = {
2197  .name = "p016le",
2198  .nb_components = 3,
2199  .log2_chroma_w = 1,
2200  .log2_chroma_h = 1,
2201  .comp = {
2202  { 0, 2, 0, 0, 16 }, /* Y */
2203  { 1, 4, 0, 0, 16 }, /* U */
2204  { 1, 4, 2, 0, 16 }, /* V */
2205  },
2206  .flags = AV_PIX_FMT_FLAG_PLANAR,
2207  },
2208  [AV_PIX_FMT_P016BE] = {
2209  .name = "p016be",
2210  .nb_components = 3,
2211  .log2_chroma_w = 1,
2212  .log2_chroma_h = 1,
2213  .comp = {
2214  { 0, 2, 0, 0, 16 }, /* Y */
2215  { 1, 4, 0, 0, 16 }, /* U */
2216  { 1, 4, 2, 0, 16 }, /* V */
2217  },
2219  },
2220  [AV_PIX_FMT_GBRAP14LE] = {
2221  .name = "gbrap14le",
2222  .nb_components = 4,
2223  .log2_chroma_w = 0,
2224  .log2_chroma_h = 0,
2225  .comp = {
2226  { 2, 2, 0, 0, 14 }, /* R */
2227  { 0, 2, 0, 0, 14 }, /* G */
2228  { 1, 2, 0, 0, 14 }, /* B */
2229  { 3, 2, 0, 0, 14 }, /* A */
2230  },
2233  },
2234  [AV_PIX_FMT_GBRAP14BE] = {
2235  .name = "gbrap14be",
2236  .nb_components = 4,
2237  .log2_chroma_w = 0,
2238  .log2_chroma_h = 0,
2239  .comp = {
2240  { 2, 2, 0, 0, 14 }, /* R */
2241  { 0, 2, 0, 0, 14 }, /* G */
2242  { 1, 2, 0, 0, 14 }, /* B */
2243  { 3, 2, 0, 0, 14 }, /* A */
2244  },
2247  },
2248  [AV_PIX_FMT_GBRAP12LE] = {
2249  .name = "gbrap12le",
2250  .nb_components = 4,
2251  .log2_chroma_w = 0,
2252  .log2_chroma_h = 0,
2253  .comp = {
2254  { 2, 2, 0, 0, 12 }, /* R */
2255  { 0, 2, 0, 0, 12 }, /* G */
2256  { 1, 2, 0, 0, 12 }, /* B */
2257  { 3, 2, 0, 0, 12 }, /* A */
2258  },
2261  },
2262  [AV_PIX_FMT_GBRAP12BE] = {
2263  .name = "gbrap12be",
2264  .nb_components = 4,
2265  .log2_chroma_w = 0,
2266  .log2_chroma_h = 0,
2267  .comp = {
2268  { 2, 2, 0, 0, 12 }, /* R */
2269  { 0, 2, 0, 0, 12 }, /* G */
2270  { 1, 2, 0, 0, 12 }, /* B */
2271  { 3, 2, 0, 0, 12 }, /* A */
2272  },
2275  },
2276  [AV_PIX_FMT_GBRAP10LE] = {
2277  .name = "gbrap10le",
2278  .nb_components = 4,
2279  .log2_chroma_w = 0,
2280  .log2_chroma_h = 0,
2281  .comp = {
2282  { 2, 2, 0, 0, 10 }, /* R */
2283  { 0, 2, 0, 0, 10 }, /* G */
2284  { 1, 2, 0, 0, 10 }, /* B */
2285  { 3, 2, 0, 0, 10 }, /* A */
2286  },
2289  },
2290  [AV_PIX_FMT_GBRAP10BE] = {
2291  .name = "gbrap10be",
2292  .nb_components = 4,
2293  .log2_chroma_w = 0,
2294  .log2_chroma_h = 0,
2295  .comp = {
2296  { 2, 2, 0, 0, 10 }, /* R */
2297  { 0, 2, 0, 0, 10 }, /* G */
2298  { 1, 2, 0, 0, 10 }, /* B */
2299  { 3, 2, 0, 0, 10 }, /* A */
2300  },
2303  },
2304  [AV_PIX_FMT_D3D11] = {
2305  .name = "d3d11",
2306  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2307  },
2308  [AV_PIX_FMT_D3D12] = {
2309  .name = "d3d12",
2310  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2311  },
2312  [AV_PIX_FMT_GBRPF32BE] = {
2313  .name = "gbrpf32be",
2314  .nb_components = 3,
2315  .log2_chroma_w = 0,
2316  .log2_chroma_h = 0,
2317  .comp = {
2318  { 2, 4, 0, 0, 32 }, /* R */
2319  { 0, 4, 0, 0, 32 }, /* G */
2320  { 1, 4, 0, 0, 32 }, /* B */
2321  },
2324  },
2325  [AV_PIX_FMT_GBRPF32LE] = {
2326  .name = "gbrpf32le",
2327  .nb_components = 3,
2328  .log2_chroma_w = 0,
2329  .log2_chroma_h = 0,
2330  .comp = {
2331  { 2, 4, 0, 0, 32 }, /* R */
2332  { 0, 4, 0, 0, 32 }, /* G */
2333  { 1, 4, 0, 0, 32 }, /* B */
2334  },
2336  },
2337  [AV_PIX_FMT_GBRAPF32BE] = {
2338  .name = "gbrapf32be",
2339  .nb_components = 4,
2340  .log2_chroma_w = 0,
2341  .log2_chroma_h = 0,
2342  .comp = {
2343  { 2, 4, 0, 0, 32 }, /* R */
2344  { 0, 4, 0, 0, 32 }, /* G */
2345  { 1, 4, 0, 0, 32 }, /* B */
2346  { 3, 4, 0, 0, 32 }, /* A */
2347  },
2351  },
2352  [AV_PIX_FMT_GBRAPF32LE] = {
2353  .name = "gbrapf32le",
2354  .nb_components = 4,
2355  .log2_chroma_w = 0,
2356  .log2_chroma_h = 0,
2357  .comp = {
2358  { 2, 4, 0, 0, 32 }, /* R */
2359  { 0, 4, 0, 0, 32 }, /* G */
2360  { 1, 4, 0, 0, 32 }, /* B */
2361  { 3, 4, 0, 0, 32 }, /* A */
2362  },
2365  },
2366  [AV_PIX_FMT_DRM_PRIME] = {
2367  .name = "drm_prime",
2368  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2369  },
2370  [AV_PIX_FMT_OPENCL] = {
2371  .name = "opencl",
2372  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2373  },
2374  [AV_PIX_FMT_GRAYF32BE] = {
2375  .name = "grayf32be",
2376  .nb_components = 1,
2377  .log2_chroma_w = 0,
2378  .log2_chroma_h = 0,
2379  .comp = {
2380  { 0, 4, 0, 0, 32 }, /* Y */
2381  },
2383  .alias = "yf32be",
2384  },
2385  [AV_PIX_FMT_GRAYF32LE] = {
2386  .name = "grayf32le",
2387  .nb_components = 1,
2388  .log2_chroma_w = 0,
2389  .log2_chroma_h = 0,
2390  .comp = {
2391  { 0, 4, 0, 0, 32 }, /* Y */
2392  },
2393  .flags = AV_PIX_FMT_FLAG_FLOAT,
2394  .alias = "yf32le",
2395  },
2397  .name = "yuva422p12be",
2398  .nb_components = 4,
2399  .log2_chroma_w = 1,
2400  .log2_chroma_h = 0,
2401  .comp = {
2402  { 0, 2, 0, 0, 12 }, /* Y */
2403  { 1, 2, 0, 0, 12 }, /* U */
2404  { 2, 2, 0, 0, 12 }, /* V */
2405  { 3, 2, 0, 0, 12 }, /* A */
2406  },
2408  },
2410  .name = "yuva422p12le",
2411  .nb_components = 4,
2412  .log2_chroma_w = 1,
2413  .log2_chroma_h = 0,
2414  .comp = {
2415  { 0, 2, 0, 0, 12 }, /* Y */
2416  { 1, 2, 0, 0, 12 }, /* U */
2417  { 2, 2, 0, 0, 12 }, /* V */
2418  { 3, 2, 0, 0, 12 }, /* A */
2419  },
2421  },
2423  .name = "yuva444p12be",
2424  .nb_components = 4,
2425  .log2_chroma_w = 0,
2426  .log2_chroma_h = 0,
2427  .comp = {
2428  { 0, 2, 0, 0, 12 }, /* Y */
2429  { 1, 2, 0, 0, 12 }, /* U */
2430  { 2, 2, 0, 0, 12 }, /* V */
2431  { 3, 2, 0, 0, 12 }, /* A */
2432  },
2434  },
2436  .name = "yuva444p12le",
2437  .nb_components = 4,
2438  .log2_chroma_w = 0,
2439  .log2_chroma_h = 0,
2440  .comp = {
2441  { 0, 2, 0, 0, 12 }, /* Y */
2442  { 1, 2, 0, 0, 12 }, /* U */
2443  { 2, 2, 0, 0, 12 }, /* V */
2444  { 3, 2, 0, 0, 12 }, /* A */
2445  },
2447  },
2448  [AV_PIX_FMT_NV24] = {
2449  .name = "nv24",
2450  .nb_components = 3,
2451  .log2_chroma_w = 0,
2452  .log2_chroma_h = 0,
2453  .comp = {
2454  { 0, 1, 0, 0, 8 }, /* Y */
2455  { 1, 2, 0, 0, 8 }, /* U */
2456  { 1, 2, 1, 0, 8 }, /* V */
2457  },
2458  .flags = AV_PIX_FMT_FLAG_PLANAR,
2459  },
2460  [AV_PIX_FMT_NV42] = {
2461  .name = "nv42",
2462  .nb_components = 3,
2463  .log2_chroma_w = 0,
2464  .log2_chroma_h = 0,
2465  .comp = {
2466  { 0, 1, 0, 0, 8 }, /* Y */
2467  { 1, 2, 1, 0, 8 }, /* U */
2468  { 1, 2, 0, 0, 8 }, /* V */
2469  },
2470  .flags = AV_PIX_FMT_FLAG_PLANAR,
2471  },
2472  [AV_PIX_FMT_VULKAN] = {
2473  .name = "vulkan",
2474  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2475  },
2476  [AV_PIX_FMT_P210BE] = {
2477  .name = "p210be",
2478  .nb_components = 3,
2479  .log2_chroma_w = 1,
2480  .log2_chroma_h = 0,
2481  .comp = {
2482  { 0, 2, 0, 6, 10 }, /* Y */
2483  { 1, 4, 0, 6, 10 }, /* U */
2484  { 1, 4, 2, 6, 10 }, /* V */
2485  },
2487  },
2488  [AV_PIX_FMT_P210LE] = {
2489  .name = "p210le",
2490  .nb_components = 3,
2491  .log2_chroma_w = 1,
2492  .log2_chroma_h = 0,
2493  .comp = {
2494  { 0, 2, 0, 6, 10 }, /* Y */
2495  { 1, 4, 0, 6, 10 }, /* U */
2496  { 1, 4, 2, 6, 10 }, /* V */
2497  },
2498  .flags = AV_PIX_FMT_FLAG_PLANAR,
2499  },
2500  [AV_PIX_FMT_P410BE] = {
2501  .name = "p410be",
2502  .nb_components = 3,
2503  .log2_chroma_w = 0,
2504  .log2_chroma_h = 0,
2505  .comp = {
2506  { 0, 2, 0, 6, 10 }, /* Y */
2507  { 1, 4, 0, 6, 10 }, /* U */
2508  { 1, 4, 2, 6, 10 }, /* V */
2509  },
2511  },
2512  [AV_PIX_FMT_P410LE] = {
2513  .name = "p410le",
2514  .nb_components = 3,
2515  .log2_chroma_w = 0,
2516  .log2_chroma_h = 0,
2517  .comp = {
2518  { 0, 2, 0, 6, 10 }, /* Y */
2519  { 1, 4, 0, 6, 10 }, /* U */
2520  { 1, 4, 2, 6, 10 }, /* V */
2521  },
2522  .flags = AV_PIX_FMT_FLAG_PLANAR,
2523  },
2524  [AV_PIX_FMT_P216BE] = {
2525  .name = "p216be",
2526  .nb_components = 3,
2527  .log2_chroma_w = 1,
2528  .log2_chroma_h = 0,
2529  .comp = {
2530  { 0, 2, 0, 0, 16 }, /* Y */
2531  { 1, 4, 0, 0, 16 }, /* U */
2532  { 1, 4, 2, 0, 16 }, /* V */
2533  },
2535  },
2536  [AV_PIX_FMT_P216LE] = {
2537  .name = "p216le",
2538  .nb_components = 3,
2539  .log2_chroma_w = 1,
2540  .log2_chroma_h = 0,
2541  .comp = {
2542  { 0, 2, 0, 0, 16 }, /* Y */
2543  { 1, 4, 0, 0, 16 }, /* U */
2544  { 1, 4, 2, 0, 16 }, /* V */
2545  },
2546  .flags = AV_PIX_FMT_FLAG_PLANAR,
2547  },
2548  [AV_PIX_FMT_P416BE] = {
2549  .name = "p416be",
2550  .nb_components = 3,
2551  .log2_chroma_w = 0,
2552  .log2_chroma_h = 0,
2553  .comp = {
2554  { 0, 2, 0, 0, 16 }, /* Y */
2555  { 1, 4, 0, 0, 16 }, /* U */
2556  { 1, 4, 2, 0, 16 }, /* V */
2557  },
2559  },
2560  [AV_PIX_FMT_P416LE] = {
2561  .name = "p416le",
2562  .nb_components = 3,
2563  .log2_chroma_w = 0,
2564  .log2_chroma_h = 0,
2565  .comp = {
2566  { 0, 2, 0, 0, 16 }, /* Y */
2567  { 1, 4, 0, 0, 16 }, /* U */
2568  { 1, 4, 2, 0, 16 }, /* V */
2569  },
2570  .flags = AV_PIX_FMT_FLAG_PLANAR,
2571  },
2572  [AV_PIX_FMT_VUYA] = {
2573  .name = "vuya",
2574  .nb_components = 4,
2575  .log2_chroma_w = 0,
2576  .log2_chroma_h = 0,
2577  .comp = {
2578  { 0, 4, 2, 0, 8 }, /* Y */
2579  { 0, 4, 1, 0, 8 }, /* U */
2580  { 0, 4, 0, 0, 8 }, /* V */
2581  { 0, 4, 3, 0, 8 }, /* A */
2582  },
2583  .flags = AV_PIX_FMT_FLAG_ALPHA,
2584  },
2585  [AV_PIX_FMT_VUYX] = {
2586  .name = "vuyx",
2587  .nb_components = 3,
2588  .log2_chroma_w = 0,
2589  .log2_chroma_h = 0,
2590  .comp = {
2591  { 0, 4, 2, 0, 8 }, /* Y */
2592  { 0, 4, 1, 0, 8 }, /* U */
2593  { 0, 4, 0, 0, 8 }, /* V */
2594  },
2595  },
2596  [AV_PIX_FMT_RGBAF16BE] = {
2597  .name = "rgbaf16be",
2598  .nb_components = 4,
2599  .log2_chroma_w = 0,
2600  .log2_chroma_h = 0,
2601  .comp = {
2602  { 0, 8, 0, 0, 16 }, /* R */
2603  { 0, 8, 2, 0, 16 }, /* G */
2604  { 0, 8, 4, 0, 16 }, /* B */
2605  { 0, 8, 6, 0, 16 }, /* A */
2606  },
2609  },
2610  [AV_PIX_FMT_RGBAF16LE] = {
2611  .name = "rgbaf16le",
2612  .nb_components = 4,
2613  .log2_chroma_w = 0,
2614  .log2_chroma_h = 0,
2615  .comp = {
2616  { 0, 8, 0, 0, 16 }, /* R */
2617  { 0, 8, 2, 0, 16 }, /* G */
2618  { 0, 8, 4, 0, 16 }, /* B */
2619  { 0, 8, 6, 0, 16 }, /* A */
2620  },
2623  },
2624  [AV_PIX_FMT_Y212LE] = {
2625  .name = "y212le",
2626  .nb_components = 3,
2627  .log2_chroma_w = 1,
2628  .log2_chroma_h = 0,
2629  .comp = {
2630  { 0, 4, 0, 4, 12 }, /* Y */
2631  { 0, 8, 2, 4, 12 }, /* U */
2632  { 0, 8, 6, 4, 12 }, /* V */
2633  },
2634  },
2635  [AV_PIX_FMT_Y212BE] = {
2636  .name = "y212be",
2637  .nb_components = 3,
2638  .log2_chroma_w = 1,
2639  .log2_chroma_h = 0,
2640  .comp = {
2641  { 0, 4, 0, 4, 12 }, /* Y */
2642  { 0, 8, 2, 4, 12 }, /* U */
2643  { 0, 8, 6, 4, 12 }, /* V */
2644  },
2645  .flags = AV_PIX_FMT_FLAG_BE,
2646  },
2647  [AV_PIX_FMT_XV30LE] = {
2648  .name = "xv30le",
2649  .nb_components= 3,
2650  .log2_chroma_w= 0,
2651  .log2_chroma_h= 0,
2652  .comp = {
2653  { 0, 4, 1, 2, 10 }, /* Y */
2654  { 0, 4, 0, 0, 10 }, /* U */
2655  { 0, 4, 2, 4, 10 }, /* V */
2656  },
2657  },
2658  [AV_PIX_FMT_XV30BE] = {
2659  .name = "xv30be",
2660  .nb_components= 3,
2661  .log2_chroma_w= 0,
2662  .log2_chroma_h= 0,
2663  .comp = {
2664  { 0, 32, 10, 0, 10 }, /* Y */
2665  { 0, 32, 0, 0, 10 }, /* U */
2666  { 0, 32, 20, 0, 10 }, /* V */
2667  },
2669  },
2670  [AV_PIX_FMT_XV36LE] = {
2671  .name = "xv36le",
2672  .nb_components= 3,
2673  .log2_chroma_w= 0,
2674  .log2_chroma_h= 0,
2675  .comp = {
2676  { 0, 8, 2, 4, 12 }, /* Y */
2677  { 0, 8, 0, 4, 12 }, /* U */
2678  { 0, 8, 4, 4, 12 }, /* V */
2679  },
2680  },
2681  [AV_PIX_FMT_XV36BE] = {
2682  .name = "xv36be",
2683  .nb_components= 3,
2684  .log2_chroma_w= 0,
2685  .log2_chroma_h= 0,
2686  .comp = {
2687  { 0, 8, 2, 4, 12 }, /* Y */
2688  { 0, 8, 0, 4, 12 }, /* U */
2689  { 0, 8, 4, 4, 12 }, /* V */
2690  },
2691  .flags = AV_PIX_FMT_FLAG_BE,
2692  },
2693  [AV_PIX_FMT_RGBF32BE] = {
2694  .name = "rgbf32be",
2695  .nb_components = 3,
2696  .log2_chroma_w = 0,
2697  .log2_chroma_h = 0,
2698  .comp = {
2699  { 0, 12, 0, 0, 32 }, /* R */
2700  { 0, 12, 4, 0, 32 }, /* G */
2701  { 0, 12, 8, 0, 32 }, /* B */
2702  },
2705  },
2706  [AV_PIX_FMT_RGBF32LE] = {
2707  .name = "rgbf32le",
2708  .nb_components = 3,
2709  .log2_chroma_w = 0,
2710  .log2_chroma_h = 0,
2711  .comp = {
2712  { 0, 12, 0, 0, 32 }, /* R */
2713  { 0, 12, 4, 0, 32 }, /* G */
2714  { 0, 12, 8, 0, 32 }, /* B */
2715  },
2717  },
2718  [AV_PIX_FMT_RGBAF32BE] = {
2719  .name = "rgbaf32be",
2720  .nb_components = 4,
2721  .log2_chroma_w = 0,
2722  .log2_chroma_h = 0,
2723  .comp = {
2724  { 0, 16, 0, 0, 32 }, /* R */
2725  { 0, 16, 4, 0, 32 }, /* G */
2726  { 0, 16, 8, 0, 32 }, /* B */
2727  { 0, 16, 12, 0, 32 }, /* A */
2728  },
2731  },
2732  [AV_PIX_FMT_RGBAF32LE] = {
2733  .name = "rgbaf32le",
2734  .nb_components = 4,
2735  .log2_chroma_w = 0,
2736  .log2_chroma_h = 0,
2737  .comp = {
2738  { 0, 16, 0, 0, 32 }, /* R */
2739  { 0, 16, 4, 0, 32 }, /* G */
2740  { 0, 16, 8, 0, 32 }, /* B */
2741  { 0, 16, 12, 0, 32 }, /* A */
2742  },
2745  },
2746  [AV_PIX_FMT_P212BE] = {
2747  .name = "p212be",
2748  .nb_components = 3,
2749  .log2_chroma_w = 1,
2750  .log2_chroma_h = 0,
2751  .comp = {
2752  { 0, 2, 0, 4, 12 }, /* Y */
2753  { 1, 4, 0, 4, 12 }, /* U */
2754  { 1, 4, 2, 4, 12 }, /* V */
2755  },
2757  },
2758  [AV_PIX_FMT_P212LE] = {
2759  .name = "p212le",
2760  .nb_components = 3,
2761  .log2_chroma_w = 1,
2762  .log2_chroma_h = 0,
2763  .comp = {
2764  { 0, 2, 0, 4, 12 }, /* Y */
2765  { 1, 4, 0, 4, 12 }, /* U */
2766  { 1, 4, 2, 4, 12 }, /* V */
2767  },
2768  .flags = AV_PIX_FMT_FLAG_PLANAR,
2769  },
2770  [AV_PIX_FMT_P412BE] = {
2771  .name = "p412be",
2772  .nb_components = 3,
2773  .log2_chroma_w = 0,
2774  .log2_chroma_h = 0,
2775  .comp = {
2776  { 0, 2, 0, 4, 12 }, /* Y */
2777  { 1, 4, 0, 4, 12 }, /* U */
2778  { 1, 4, 2, 4, 12 }, /* V */
2779  },
2781  },
2782  [AV_PIX_FMT_P412LE] = {
2783  .name = "p412le",
2784  .nb_components = 3,
2785  .log2_chroma_w = 0,
2786  .log2_chroma_h = 0,
2787  .comp = {
2788  { 0, 2, 0, 4, 12 }, /* Y */
2789  { 1, 4, 0, 4, 12 }, /* U */
2790  { 1, 4, 2, 4, 12 }, /* V */
2791  },
2792  .flags = AV_PIX_FMT_FLAG_PLANAR,
2793  },
2794 };
2795 
2796 static const char * const color_range_names[] = {
2797  [AVCOL_RANGE_UNSPECIFIED] = "unknown",
2798  [AVCOL_RANGE_MPEG] = "tv",
2799  [AVCOL_RANGE_JPEG] = "pc",
2800 };
2801 
2802 static const char * const color_primaries_names[AVCOL_PRI_NB] = {
2803  [AVCOL_PRI_RESERVED0] = "reserved",
2804  [AVCOL_PRI_BT709] = "bt709",
2805  [AVCOL_PRI_UNSPECIFIED] = "unknown",
2806  [AVCOL_PRI_RESERVED] = "reserved",
2807  [AVCOL_PRI_BT470M] = "bt470m",
2808  [AVCOL_PRI_BT470BG] = "bt470bg",
2809  [AVCOL_PRI_SMPTE170M] = "smpte170m",
2810  [AVCOL_PRI_SMPTE240M] = "smpte240m",
2811  [AVCOL_PRI_FILM] = "film",
2812  [AVCOL_PRI_BT2020] = "bt2020",
2813  [AVCOL_PRI_SMPTE428] = "smpte428",
2814  [AVCOL_PRI_SMPTE431] = "smpte431",
2815  [AVCOL_PRI_SMPTE432] = "smpte432",
2816  [AVCOL_PRI_EBU3213] = "ebu3213",
2817 };
2818 
2819 static const char * const color_transfer_names[] = {
2820  [AVCOL_TRC_RESERVED0] = "reserved",
2821  [AVCOL_TRC_BT709] = "bt709",
2822  [AVCOL_TRC_UNSPECIFIED] = "unknown",
2823  [AVCOL_TRC_RESERVED] = "reserved",
2824  [AVCOL_TRC_GAMMA22] = "bt470m",
2825  [AVCOL_TRC_GAMMA28] = "bt470bg",
2826  [AVCOL_TRC_SMPTE170M] = "smpte170m",
2827  [AVCOL_TRC_SMPTE240M] = "smpte240m",
2828  [AVCOL_TRC_LINEAR] = "linear",
2829  [AVCOL_TRC_LOG] = "log100",
2830  [AVCOL_TRC_LOG_SQRT] = "log316",
2831  [AVCOL_TRC_IEC61966_2_4] = "iec61966-2-4",
2832  [AVCOL_TRC_BT1361_ECG] = "bt1361e",
2833  [AVCOL_TRC_IEC61966_2_1] = "iec61966-2-1",
2834  [AVCOL_TRC_BT2020_10] = "bt2020-10",
2835  [AVCOL_TRC_BT2020_12] = "bt2020-12",
2836  [AVCOL_TRC_SMPTE2084] = "smpte2084",
2837  [AVCOL_TRC_SMPTE428] = "smpte428",
2838  [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67",
2839 };
2840 
2841 static const char * const color_space_names[] = {
2842  [AVCOL_SPC_RGB] = "gbr",
2843  [AVCOL_SPC_BT709] = "bt709",
2844  [AVCOL_SPC_UNSPECIFIED] = "unknown",
2845  [AVCOL_SPC_RESERVED] = "reserved",
2846  [AVCOL_SPC_FCC] = "fcc",
2847  [AVCOL_SPC_BT470BG] = "bt470bg",
2848  [AVCOL_SPC_SMPTE170M] = "smpte170m",
2849  [AVCOL_SPC_SMPTE240M] = "smpte240m",
2850  [AVCOL_SPC_YCGCO] = "ycgco",
2851  [AVCOL_SPC_BT2020_NCL] = "bt2020nc",
2852  [AVCOL_SPC_BT2020_CL] = "bt2020c",
2853  [AVCOL_SPC_SMPTE2085] = "smpte2085",
2854  [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
2855  [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
2856  [AVCOL_SPC_ICTCP] = "ictcp",
2857  [AVCOL_SPC_IPT_C2] = "ipt-c2",
2858  [AVCOL_SPC_YCGCO_RE] = "ycgco-re",
2859  [AVCOL_SPC_YCGCO_RO] = "ycgco-ro",
2860 };
2861 
2862 static const char * const chroma_location_names[] = {
2863  [AVCHROMA_LOC_UNSPECIFIED] = "unspecified",
2864  [AVCHROMA_LOC_LEFT] = "left",
2865  [AVCHROMA_LOC_CENTER] = "center",
2866  [AVCHROMA_LOC_TOPLEFT] = "topleft",
2867  [AVCHROMA_LOC_TOP] = "top",
2868  [AVCHROMA_LOC_BOTTOMLEFT] = "bottomleft",
2869  [AVCHROMA_LOC_BOTTOM] = "bottom",
2870 };
2871 
2872 static enum AVPixelFormat get_pix_fmt_internal(const char *name)
2873 {
2874  enum AVPixelFormat pix_fmt;
2875 
2876  for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
2878  (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
2880  return pix_fmt;
2881 
2882  return AV_PIX_FMT_NONE;
2883 }
2884 
2886 {
2887  return (unsigned)pix_fmt < AV_PIX_FMT_NB ?
2889 }
2890 
2891 #if HAVE_BIGENDIAN
2892 # define X_NE(be, le) be
2893 #else
2894 # define X_NE(be, le) le
2895 #endif
2896 
2898 {
2899  enum AVPixelFormat pix_fmt;
2900 
2901  if (!strcmp(name, "rgb32"))
2902  name = X_NE("argb", "bgra");
2903  else if (!strcmp(name, "bgr32"))
2904  name = X_NE("abgr", "rgba");
2905 
2907  if (pix_fmt == AV_PIX_FMT_NONE) {
2908  char name2[32];
2909 
2910  snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le"));
2911  pix_fmt = get_pix_fmt_internal(name2);
2912  }
2913 
2914  return pix_fmt;
2915 }
2916 
2918 {
2919  int c, bits = 0;
2920  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2921 
2922  for (c = 0; c < pixdesc->nb_components; c++) {
2923  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2924  bits += pixdesc->comp[c].depth << s;
2925  }
2926 
2927  return bits >> log2_pixels;
2928 }
2929 
2931 {
2932  int c, bits = 0;
2933  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2934  int steps[4] = {0};
2935 
2936  for (c = 0; c < pixdesc->nb_components; c++) {
2937  const AVComponentDescriptor *comp = &pixdesc->comp[c];
2938  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2939  steps[comp->plane] = comp->step << s;
2940  }
2941  for (c = 0; c < 4; c++)
2942  bits += steps[c];
2943 
2944  if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM))
2945  bits *= 8;
2946 
2947  return bits >> log2_pixels;
2948 }
2949 
2950 char *av_get_pix_fmt_string(char *buf, int buf_size,
2951  enum AVPixelFormat pix_fmt)
2952 {
2953  /* print header */
2954  if (pix_fmt < 0) {
2955  snprintf (buf, buf_size, "name" " nb_components" " nb_bits");
2956  } else {
2958  snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name,
2959  pixdesc->nb_components, av_get_bits_per_pixel(pixdesc));
2960  }
2961 
2962  return buf;
2963 }
2964 
2966 {
2967  if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
2968  return NULL;
2970 }
2971 
2973 {
2974  if (!prev)
2975  return &av_pix_fmt_descriptors[0];
2977  prev++;
2978  if (prev->name)
2979  return prev;
2980  }
2981  return NULL;
2982 }
2983 
2985 {
2986  if (desc < av_pix_fmt_descriptors ||
2988  return AV_PIX_FMT_NONE;
2989 
2990  return desc - av_pix_fmt_descriptors;
2991 }
2992 
2994  int *h_shift, int *v_shift)
2995 {
2997  if (!desc)
2998  return AVERROR(ENOSYS);
2999  *h_shift = desc->log2_chroma_w;
3000  *v_shift = desc->log2_chroma_h;
3001 
3002  return 0;
3003 }
3004 
3006 {
3008  int i, planes[4] = { 0 }, ret = 0;
3009 
3010  if (!desc)
3011  return AVERROR(EINVAL);
3012 
3013  for (i = 0; i < desc->nb_components; i++)
3014  planes[desc->comp[i].plane] = 1;
3015  for (i = 0; i < FF_ARRAY_ELEMS(planes); i++)
3016  ret += planes[i];
3017  return ret;
3018 }
3019 
3021 {
3023  char name[16];
3024  int i;
3025 
3026  if (!desc || strlen(desc->name) < 2)
3027  return AV_PIX_FMT_NONE;
3028  av_strlcpy(name, desc->name, sizeof(name));
3029  i = strlen(name) - 2;
3030  if (strcmp(name + i, "be") && strcmp(name + i, "le"))
3031  return AV_PIX_FMT_NONE;
3032 
3033  name[i] ^= 'b' ^ 'l';
3034 
3035  return get_pix_fmt_internal(name);
3036 }
3037 
3038 #define FF_COLOR_NA -1
3039 #define FF_COLOR_RGB 0 /**< RGB color space */
3040 #define FF_COLOR_GRAY 1 /**< gray color space */
3041 #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
3042 #define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
3043 #define FF_COLOR_XYZ 4
3044 
3045 #define pixdesc_has_alpha(pixdesc) \
3046  ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
3047 
3048 
3050  if (desc->flags & AV_PIX_FMT_FLAG_PAL)
3051  return FF_COLOR_RGB;
3052 
3053  if(desc->nb_components == 1 || desc->nb_components == 2)
3054  return FF_COLOR_GRAY;
3055 
3056  if (desc->name) {
3057  if (av_strstart(desc->name, "yuvj", NULL))
3058  return FF_COLOR_YUV_JPEG;
3059  }
3060 
3061  if(desc->flags & AV_PIX_FMT_FLAG_RGB)
3062  return FF_COLOR_RGB;
3063 
3064  if(desc->flags & AV_PIX_FMT_FLAG_XYZ)
3065  return FF_COLOR_XYZ;
3066 
3067  if(desc->nb_components == 0)
3068  return FF_COLOR_NA;
3069 
3070  return FF_COLOR_YUV;
3071 }
3072 
3073 static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
3074 {
3076  int i;
3077 
3078  if (!desc || !desc->nb_components) {
3079  *min = *max = 0;
3080  return AVERROR(EINVAL);
3081  }
3082 
3083  *min = INT_MAX, *max = -INT_MAX;
3084  for (i = 0; i < desc->nb_components; i++) {
3085  *min = FFMIN(desc->comp[i].depth, *min);
3086  *max = FFMAX(desc->comp[i].depth, *max);
3087  }
3088  return 0;
3089 }
3090 
3091 static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
3092  enum AVPixelFormat src_pix_fmt,
3093  unsigned *lossp, unsigned consider)
3094 {
3095  const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
3096  const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
3097  int src_color, dst_color;
3098  int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
3099  int ret, loss, i, nb_components;
3100  int score = INT_MAX - 1;
3101 
3102  if (!src_desc || !dst_desc)
3103  return -4;
3104 
3105  if ((src_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) ||
3106  (dst_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
3107  if (dst_pix_fmt == src_pix_fmt)
3108  return -1;
3109  else
3110  return -2;
3111  }
3112 
3113  /* compute loss */
3114  *lossp = loss = 0;
3115 
3116  if (dst_pix_fmt == src_pix_fmt)
3117  return INT_MAX;
3118 
3119  if ((ret = get_pix_fmt_depth(&src_min_depth, &src_max_depth, src_pix_fmt)) < 0)
3120  return -3;
3121  if ((ret = get_pix_fmt_depth(&dst_min_depth, &dst_max_depth, dst_pix_fmt)) < 0)
3122  return -3;
3123 
3124  src_color = get_color_type(src_desc);
3125  dst_color = get_color_type(dst_desc);
3126  if (dst_pix_fmt == AV_PIX_FMT_PAL8)
3127  nb_components = FFMIN(src_desc->nb_components, 4);
3128  else
3129  nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components);
3130 
3131  for (i = 0; i < nb_components; i++) {
3132  int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1);
3133  int depth_delta = src_desc->comp[i].depth - 1 - depth_minus1;
3134  if (depth_delta > 0 && (consider & FF_LOSS_DEPTH)) {
3135  loss |= FF_LOSS_DEPTH;
3136  score -= 65536 >> depth_minus1;
3137  } else if (depth_delta < 0 && (consider & FF_LOSS_EXCESS_DEPTH)) {
3138  // Favour formats where bit depth exactly matches. If all other
3139  // scoring is equal, we'd rather use the bit depth that most closely
3140  // matches the source.
3141  loss |= FF_LOSS_EXCESS_DEPTH;
3142  score += depth_delta;
3143  }
3144  }
3145 
3146  if (consider & FF_LOSS_RESOLUTION) {
3147  if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w) {
3148  loss |= FF_LOSS_RESOLUTION;
3149  score -= 256 << dst_desc->log2_chroma_w;
3150  }
3151  if (dst_desc->log2_chroma_h > src_desc->log2_chroma_h) {
3152  loss |= FF_LOSS_RESOLUTION;
3153  score -= 256 << dst_desc->log2_chroma_h;
3154  }
3155  // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side
3156  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 &&
3157  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) {
3158  score += 512;
3159  }
3160  }
3161 
3162  if (consider & FF_LOSS_EXCESS_RESOLUTION) {
3163  // Favour formats where chroma subsampling exactly matches. If all other
3164  // scoring is equal, we'd rather use the subsampling that most closely
3165  // matches the source.
3166  if (dst_desc->log2_chroma_w < src_desc->log2_chroma_w) {
3167  loss |= FF_LOSS_EXCESS_RESOLUTION;
3168  score -= 1 << (src_desc->log2_chroma_w - dst_desc->log2_chroma_w);
3169  }
3170 
3171  if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) {
3172  loss |= FF_LOSS_EXCESS_RESOLUTION;
3173  score -= 1 << (src_desc->log2_chroma_h - dst_desc->log2_chroma_h);
3174  }
3175 
3176  // don't favour 411 over 420, because 420 has much better support on the
3177  // decoder side.
3178  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 2 &&
3179  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 2) {
3180  score += 4;
3181  }
3182  }
3183 
3184  if(consider & FF_LOSS_COLORSPACE)
3185  switch(dst_color) {
3186  case FF_COLOR_RGB:
3187  if (src_color != FF_COLOR_RGB &&
3188  src_color != FF_COLOR_GRAY)
3189  loss |= FF_LOSS_COLORSPACE;
3190  break;
3191  case FF_COLOR_GRAY:
3192  if (src_color != FF_COLOR_GRAY)
3193  loss |= FF_LOSS_COLORSPACE;
3194  break;
3195  case FF_COLOR_YUV:
3196  if (src_color != FF_COLOR_YUV)
3197  loss |= FF_LOSS_COLORSPACE;
3198  break;
3199  case FF_COLOR_YUV_JPEG:
3200  if (src_color != FF_COLOR_YUV_JPEG &&
3201  src_color != FF_COLOR_YUV &&
3202  src_color != FF_COLOR_GRAY)
3203  loss |= FF_LOSS_COLORSPACE;
3204  break;
3205  default:
3206  /* fail safe test */
3207  if (src_color != dst_color)
3208  loss |= FF_LOSS_COLORSPACE;
3209  break;
3210  }
3211  if(loss & FF_LOSS_COLORSPACE)
3212  score -= (nb_components * 65536) >> FFMIN(dst_desc->comp[0].depth - 1, src_desc->comp[0].depth - 1);
3213 
3214  if (dst_color == FF_COLOR_GRAY &&
3215  src_color != FF_COLOR_GRAY && (consider & FF_LOSS_CHROMA)) {
3216  loss |= FF_LOSS_CHROMA;
3217  score -= 2 * 65536;
3218  }
3219  if (!pixdesc_has_alpha(dst_desc) && (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))) {
3220  loss |= FF_LOSS_ALPHA;
3221  score -= 65536;
3222  }
3223  if (dst_pix_fmt == AV_PIX_FMT_PAL8 && (consider & FF_LOSS_COLORQUANT) &&
3224  (src_pix_fmt != AV_PIX_FMT_PAL8 && (src_color != FF_COLOR_GRAY || (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))))) {
3225  loss |= FF_LOSS_COLORQUANT;
3226  score -= 65536;
3227  }
3228 
3229  *lossp = loss;
3230  return score;
3231 }
3232 
3233 int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
3234  enum AVPixelFormat src_pix_fmt,
3235  int has_alpha)
3236 {
3237  int loss;
3238  int ret = get_pix_fmt_score(dst_pix_fmt, src_pix_fmt, &loss, has_alpha ? ~0 : ~FF_LOSS_ALPHA);
3239  if (ret < 0)
3240  return ret;
3241  return loss;
3242 }
3243 
3244 enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
3245  enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
3246 {
3247  enum AVPixelFormat dst_pix_fmt;
3248  int loss1, loss2, loss_mask;
3249  const AVPixFmtDescriptor *desc1 = av_pix_fmt_desc_get(dst_pix_fmt1);
3250  const AVPixFmtDescriptor *desc2 = av_pix_fmt_desc_get(dst_pix_fmt2);
3251  int score1, score2;
3252 
3253  if (!desc1) {
3254  dst_pix_fmt = dst_pix_fmt2;
3255  } else if (!desc2) {
3256  dst_pix_fmt = dst_pix_fmt1;
3257  } else {
3258  loss_mask= loss_ptr?~*loss_ptr:~0; /* use loss mask if provided */
3259  if(!has_alpha)
3260  loss_mask &= ~FF_LOSS_ALPHA;
3261 
3262  score1 = get_pix_fmt_score(dst_pix_fmt1, src_pix_fmt, &loss1, loss_mask);
3263  score2 = get_pix_fmt_score(dst_pix_fmt2, src_pix_fmt, &loss2, loss_mask);
3264 
3265  if (score1 == score2) {
3267  dst_pix_fmt = av_get_padded_bits_per_pixel(desc2) < av_get_padded_bits_per_pixel(desc1) ? dst_pix_fmt2 : dst_pix_fmt1;
3268  } else {
3269  dst_pix_fmt = desc2->nb_components < desc1->nb_components ? dst_pix_fmt2 : dst_pix_fmt1;
3270  }
3271  } else {
3272  dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
3273  }
3274  }
3275 
3276  if (loss_ptr)
3277  *loss_ptr = av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha);
3278  return dst_pix_fmt;
3279 }
3280 
3282 {
3283  return (unsigned) range < AVCOL_RANGE_NB ?
3285 }
3286 
3288 {
3289  int i;
3290 
3291  for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) {
3293  return i;
3294  }
3295 
3296  return AVERROR(EINVAL);
3297 }
3298 
3300 {
3301  return (unsigned) primaries < AVCOL_PRI_NB ?
3303 }
3304 
3306 {
3307  int i;
3308 
3309  for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) {
3310  if (!color_primaries_names[i])
3311  continue;
3312 
3314  return i;
3315  }
3316 
3317  return AVERROR(EINVAL);
3318 }
3319 
3321 {
3322  return (unsigned) transfer < AVCOL_TRC_NB ?
3324 }
3325 
3327 {
3328  int i;
3329 
3330  for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) {
3331  if (!color_transfer_names[i])
3332  continue;
3333 
3335  return i;
3336  }
3337 
3338  return AVERROR(EINVAL);
3339 }
3340 
3342 {
3343  return (unsigned) space < AVCOL_SPC_NB ?
3345 }
3346 
3348 {
3349  int i;
3350 
3351  for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) {
3352  if (!color_space_names[i])
3353  continue;
3354 
3356  return i;
3357  }
3358 
3359  return AVERROR(EINVAL);
3360 }
3361 
3362 const char *av_chroma_location_name(enum AVChromaLocation location)
3363 {
3364  return (unsigned) location < AVCHROMA_LOC_NB ?
3365  chroma_location_names[location] : NULL;
3366 }
3367 
3369 {
3370  int i;
3371 
3372  for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) {
3373  if (!chroma_location_names[i])
3374  continue;
3375 
3377  return i;
3378  }
3379 
3380  return AVERROR(EINVAL);
3381 }
3382 
3383 int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
3384 {
3385  if (pos <= AVCHROMA_LOC_UNSPECIFIED || pos >= AVCHROMA_LOC_NB)
3386  return AVERROR(EINVAL);
3387  pos--;
3388 
3389  *xpos = (pos&1) * 128;
3390  *ypos = ((pos>>1)^(pos<4)) * 128;
3391 
3392  return 0;
3393 }
3394 
3396 {
3397  int pos, xout, yout;
3398 
3399  for (pos = AVCHROMA_LOC_UNSPECIFIED + 1; pos < AVCHROMA_LOC_NB; pos++) {
3400  if (av_chroma_location_enum_to_pos(&xout, &yout, pos) == 0 && xout == xpos && yout == ypos)
3401  return pos;
3402  }
3403  return AVCHROMA_LOC_UNSPECIFIED;
3404 }
AVCOL_PRI_RESERVED
@ AVCOL_PRI_RESERVED
Definition: pixfmt.h:559
AV_PIX_FMT_XYZ12LE
@ AV_PIX_FMT_XYZ12LE
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as lit...
Definition: pixfmt.h:196
av_pix_fmt_swap_endianness
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
Definition: pixdesc.c:3020
AV_PIX_FMT_YUV420P9LE
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:154
AV_PIX_FMT_XV30LE
@ AV_PIX_FMT_XV30LE
packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channe...
Definition: pixfmt.h:415
AV_PIX_FMT_CUDA
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
Definition: pixfmt.h:260
AV_PIX_FMT_GRAY10BE
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
Definition: pixfmt.h:320
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
AV_PIX_FMT_BAYER_GBRG16LE
@ AV_PIX_FMT_BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:293
AV_PIX_FMT_BGR48LE
@ AV_PIX_FMT_BGR48LE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:146
AVCOL_PRI_EBU3213
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
Definition: pixfmt.h:571
AV_PIX_FMT_P416BE
@ AV_PIX_FMT_P416BE
interleaved chroma YUV 4:4:4, 48bpp, big-endian
Definition: pixfmt.h:398
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AV_PIX_FMT_YA8
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
Definition: pixfmt.h:140
FF_LOSS_CHROMA
#define FF_LOSS_CHROMA
loss of chroma (e.g.
Definition: pixdesc.h:392
AV_PIX_FMT_BGRA64BE
@ AV_PIX_FMT_BGRA64BE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:204
space
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated space
Definition: undefined.txt:4
AV_WL32
#define AV_WL32(p, v)
Definition: intreadwrite.h:424
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:580
comp
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
Definition: eamad.c:81
AV_PIX_FMT_RGB444LE
@ AV_PIX_FMT_RGB444LE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:136
AV_PIX_FMT_GBRP16BE
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
Definition: pixfmt.h:171
AVCOL_SPC_YCGCO_RE
@ AVCOL_SPC_YCGCO_RE
YCgCo-R, even addition of bits.
Definition: pixfmt.h:627
AV_PIX_FMT_GBRP10BE
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
Definition: pixfmt.h:169
BAYER16_DESC_COMMON
#define BAYER16_DESC_COMMON
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2965
AVCOL_TRC_LINEAR
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
Definition: pixfmt.h:589
AVCHROMA_LOC_BOTTOM
@ AVCHROMA_LOC_BOTTOM
Definition: pixfmt.h:712
AV_PIX_FMT_YUV422P14LE
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:274
AV_PIX_FMT_MMAL
@ AV_PIX_FMT_MMAL
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure.
Definition: pixfmt.h:252
AV_PIX_FMT_FLAG_FLOAT
#define AV_PIX_FMT_FLAG_FLOAT
The pixel format contains IEEE-754 floating point values.
Definition: pixdesc.h:158
av_write_image_line
void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w)
Definition: pixdesc.c:189
av_pix_fmt_descriptors
static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
Definition: pixdesc.c:197
av_color_space_from_name
int av_color_space_from_name(const char *name)
Definition: pixdesc.c:3347
AVCOL_TRC_NB
@ AVCOL_TRC_NB
Not part of ABI.
Definition: pixfmt.h:602
AV_PIX_FMT_YUVA444P10BE
@ AV_PIX_FMT_YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
Definition: pixfmt.h:185
pixdesc.h
AV_PIX_FMT_RGBA64BE
@ AV_PIX_FMT_RGBA64BE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:202
step
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
Definition: rate_distortion.txt:58
AV_PIX_FMT_YUV440P12BE
@ AV_PIX_FMT_YUV440P12BE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
Definition: pixfmt.h:301
AV_PIX_FMT_GBRAPF32LE
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
Definition: pixfmt.h:344
av_color_range_from_name
int av_color_range_from_name(const char *name)
Definition: pixdesc.c:3287
w
uint8_t w
Definition: llviddspenc.c:38
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
Full range content.
Definition: pixfmt.h:686
AV_PIX_FMT_X2BGR10BE
@ AV_PIX_FMT_X2BGR10BE
packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), big-endian, X=unused/undefined
Definition: pixfmt.h:387
AV_PIX_FMT_GBRPF32BE
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
Definition: pixfmt.h:341
AV_PIX_FMT_DRM_PRIME
@ AV_PIX_FMT_DRM_PRIME
DRM-managed buffers exposed through PRIME buffer sharing.
Definition: pixfmt.h:351
AVComponentDescriptor::depth
int depth
Number of bits in the component.
Definition: pixdesc.h:57
AV_PIX_FMT_P412BE
@ AV_PIX_FMT_P412BE
interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian
Definition: pixfmt.h:429
AVPixFmtDescriptor::name
const char * name
Definition: pixdesc.h:70
AVCOL_SPC_NB
@ AVCOL_SPC_NB
Not part of ABI.
Definition: pixfmt.h:629
AVCOL_TRC_UNSPECIFIED
@ AVCOL_TRC_UNSPECIFIED
Definition: pixfmt.h:583
data
const char data[16]
Definition: mxf.c:148
AV_PIX_FMT_P010BE
@ AV_PIX_FMT_P010BE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:308
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:82
av_pix_fmt_desc_next
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
Definition: pixdesc.c:2972
AV_PIX_FMT_YUV420P14BE
@ AV_PIX_FMT_YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:269
AV_PIX_FMT_YUV420P16LE
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:128
AV_PIX_FMT_D3D11VA_VLD
@ AV_PIX_FMT_D3D11VA_VLD
HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView p...
Definition: pixfmt.h:254
AVCOL_SPC_RGB
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
Definition: pixfmt.h:610
AVCOL_TRC_BT2020_12
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
Definition: pixfmt.h:596
AV_PIX_FMT_GBRP14BE
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
Definition: pixfmt.h:281
AV_PIX_FMT_BGR24
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:76
AV_PIX_FMT_BGRA
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:102
av_get_bits_per_pixel
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
Definition: pixdesc.c:2917
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:106
max
#define max(a, b)
Definition: cuda_runtime.h:33
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
av_get_pix_fmt_string
char * av_get_pix_fmt_string(char *buf, int buf_size, enum AVPixelFormat pix_fmt)
Print in buf the string corresponding to the pixel format with number pix_fmt, or a header if pix_fmt...
Definition: pixdesc.c:2950
AVColorPrimaries
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:555
FF_COLOR_GRAY
#define FF_COLOR_GRAY
gray color space
Definition: pixdesc.c:3040
AV_PIX_FMT_YUV422P9BE
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:163
AV_PIX_FMT_YUVA444P9BE
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
Definition: pixfmt.h:179
AV_PIX_FMT_BAYER_GRBG16BE
@ AV_PIX_FMT_BAYER_GRBG16BE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:296
AV_PIX_FMT_GRAY10LE
@ AV_PIX_FMT_GRAY10LE
Y , 10bpp, little-endian.
Definition: pixfmt.h:321
AV_PIX_FMT_GRAYF32LE
@ AV_PIX_FMT_GRAYF32LE
IEEE-754 single precision Y, 32bpp, little-endian.
Definition: pixfmt.h:364
AV_PIX_FMT_GBRAP14BE
@ AV_PIX_FMT_GBRAP14BE
planar GBR 4:4:4:4 56bpp, big-endian
Definition: pixfmt.h:432
AVCOL_SPC_BT2020_CL
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
Definition: pixfmt.h:621
av_chroma_location_name
const char * av_chroma_location_name(enum AVChromaLocation location)
Definition: pixdesc.c:3362
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:379
AV_PIX_FMT_RGB555BE
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:114
AV_PIX_FMT_RGBAF16LE
@ AV_PIX_FMT_RGBAF16LE
IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian.
Definition: pixfmt.h:404
FF_LOSS_EXCESS_RESOLUTION
#define FF_LOSS_EXCESS_RESOLUTION
loss due to unneeded extra resolution
Definition: pixdesc.h:393
AV_PIX_FMT_AYUV64LE
@ AV_PIX_FMT_AYUV64LE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
Definition: pixfmt.h:302
AV_PIX_FMT_YUV444P16LE
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:132
FF_LOSS_ALPHA
#define FF_LOSS_ALPHA
loss of alpha bits
Definition: pixdesc.h:390
AV_PIX_FMT_BAYER_GBRG16BE
@ AV_PIX_FMT_BAYER_GBRG16BE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:294
AV_PIX_FMT_AYUV64BE
@ AV_PIX_FMT_AYUV64BE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
Definition: pixfmt.h:303
AV_PIX_FMT_NB
@ AV_PIX_FMT_NB
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
Definition: pixfmt.h:442
FF_LOSS_EXCESS_DEPTH
#define FF_LOSS_EXCESS_DEPTH
loss due to unneeded extra color depth
Definition: pixdesc.h:394
AV_PIX_FMT_GBRAP12LE
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
Definition: pixfmt.h:311
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:104
primaries
enum AVColorPrimaries primaries
Definition: mediacodec_wrapper.c:2482
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3005
AVCOL_SPC_BT470BG
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
Definition: pixfmt.h:615
av_chroma_location_from_name
int av_chroma_location_from_name(const char *name)
Definition: pixdesc.c:3368
AVCOL_SPC_RESERVED
@ AVCOL_SPC_RESERVED
reserved for future use by ITU-T and ISO/IEC just like 15-255 are
Definition: pixfmt.h:613
AVCOL_TRC_IEC61966_2_1
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
Definition: pixfmt.h:594
AV_PIX_FMT_Y212BE
@ AV_PIX_FMT_Y212BE
packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:411
av_color_space_name
const char * av_color_space_name(enum AVColorSpace space)
Definition: pixdesc.c:3341
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:212
AV_PIX_FMT_YUV420P12LE
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:268
AV_PIX_FMT_FLAG_HWACCEL
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
Definition: pixdesc.h:128
AV_PIX_FMT_GRAY9LE
@ AV_PIX_FMT_GRAY9LE
Y , 9bpp, little-endian.
Definition: pixfmt.h:339
AVCOL_RANGE_NB
@ AVCOL_RANGE_NB
Not part of ABI.
Definition: pixfmt.h:687
AVCOL_TRC_GAMMA28
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
Definition: pixfmt.h:586
av_color_transfer_from_name
int av_color_transfer_from_name(const char *name)
Definition: pixdesc.c:3326
val
static double val(void *priv, double ch)
Definition: aeval.c:78
av_pix_fmt_get_chroma_sub_sample
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
Definition: pixdesc.c:2993
chroma_location_names
static const char *const chroma_location_names[]
Definition: pixdesc.c:2862
AVCOL_TRC_LOG_SQRT
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
Definition: pixfmt.h:591
AV_PIX_FMT_YUVA444P16BE
@ AV_PIX_FMT_YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
Definition: pixfmt.h:191
AV_PIX_FMT_YUV444P10BE
@ AV_PIX_FMT_YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:161
AVCOL_TRC_GAMMA22
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
Definition: pixfmt.h:585
AV_PIX_FMT_YUV420P10LE
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:156
AV_PIX_FMT_VUYA
@ AV_PIX_FMT_VUYA
packed VUYA 4:4:4, 32bpp, VUYAVUYA...
Definition: pixfmt.h:401
AV_PIX_FMT_YUV444P12LE
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:276
AV_PIX_FMT_YUVJ411P
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition: pixfmt.h:283
AV_PIX_FMT_YUV422P12BE
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:271
AV_PIX_FMT_YUV444P14LE
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:278
AV_PIX_FMT_BGR8
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: pixfmt.h:90
AV_PIX_FMT_BAYER_RGGB16BE
@ AV_PIX_FMT_BAYER_RGGB16BE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:292
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AVCOL_PRI_RESERVED0
@ AVCOL_PRI_RESERVED0
Definition: pixfmt.h:556
mask
static const uint16_t mask[17]
Definition: lzw.c:38
AV_PIX_FMT_YUVJ422P
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:86
AV_PIX_FMT_GBRAP16BE
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
Definition: pixfmt.h:213
planes
static const struct @417 planes[]
intreadwrite.h
AV_PIX_FMT_XV30BE
@ AV_PIX_FMT_XV30BE
packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel i...
Definition: pixfmt.h:414
AV_PIX_FMT_DXVA2_VLD
@ AV_PIX_FMT_DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
Definition: pixfmt.h:134
s
#define s(width, name)
Definition: cbs_vp9.c:198
AV_PIX_FMT_GBRP16LE
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
Definition: pixfmt.h:172
AVCHROMA_LOC_TOP
@ AVCHROMA_LOC_TOP
Definition: pixfmt.h:710
av_chroma_location_enum_to_pos
int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
Converts AVChromaLocation to swscale x/y chroma position.
Definition: pixdesc.c:3383
AVCOL_PRI_NB
@ AVCOL_PRI_NB
Not part of ABI.
Definition: pixfmt.h:573
AV_PIX_FMT_YUVA420P
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:108
AVCOL_TRC_BT1361_ECG
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
Definition: pixfmt.h:593
color_space_names
static const char *const color_space_names[]
Definition: pixdesc.c:2841
AV_PIX_FMT_P416LE
@ AV_PIX_FMT_P416LE
interleaved chroma YUV 4:4:4, 48bpp, little-endian
Definition: pixfmt.h:399
AV_PIX_FMT_BAYER_RGGB16LE
@ AV_PIX_FMT_BAYER_RGGB16LE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:291
AV_PIX_FMT_P210LE
@ AV_PIX_FMT_P210LE
interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, little-endian
Definition: pixfmt.h:390
AV_PIX_FMT_BAYER_BGGR8
@ AV_PIX_FMT_BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: pixfmt.h:285
AVCOL_SPC_SMPTE170M
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
Definition: pixfmt.h:616
pix_fmt
static enum AVPixelFormat pix_fmt
Definition: demux_decode.c:41
AV_PIX_FMT_NV20BE
@ AV_PIX_FMT_NV20BE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:200
AV_PIX_FMT_P016BE
@ AV_PIX_FMT_P016BE
like NV12, with 16bpp per component, big-endian
Definition: pixfmt.h:324
bits
uint8_t bits
Definition: vp3data.h:128
AV_PIX_FMT_GBRP12LE
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
Definition: pixfmt.h:280
AV_PIX_FMT_YUVA420P16BE
@ AV_PIX_FMT_YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
Definition: pixfmt.h:187
AV_PIX_FMT_FLAG_ALPHA
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
Definition: pixdesc.h:147
AV_RL16
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
Definition: bytestream.h:94
AVCOL_PRI_SMPTE428
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
Definition: pixfmt.h:567
color_range_names
static const char *const color_range_names[]
Definition: pixdesc.c:2796
AV_PIX_FMT_RGB4
@ AV_PIX_FMT_RGB4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
Definition: pixfmt.h:94
AVPixFmtDescriptor::log2_chroma_w
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:80
AV_PIX_FMT_GBRP10LE
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
Definition: pixfmt.h:170
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:73
AVCOL_PRI_SMPTE240M
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
Definition: pixfmt.h:564
AVCOL_SPC_IPT_C2
@ AVCOL_SPC_IPT_C2
SMPTE ST 2128, IPT-C2.
Definition: pixfmt.h:626
av_read_image_line2
void av_read_image_line2(void *dst, const uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component, int dst_element_size)
Read a line from an image, and write the values of the pixel format component c to dst.
Definition: pixdesc.c:31
AVCOL_PRI_UNSPECIFIED
@ AVCOL_PRI_UNSPECIFIED
Definition: pixfmt.h:558
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:100
AV_PIX_FMT_YUVJ444P
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:87
AVCOL_SPC_CHROMA_DERIVED_CL
@ AVCOL_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
Definition: pixfmt.h:624
AVCOL_PRI_BT470BG
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
Definition: pixfmt.h:562
AV_PIX_FMT_YUV444P10LE
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:162
AV_PIX_FMT_BAYER_RGGB8
@ AV_PIX_FMT_BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
Definition: pixfmt.h:286
AV_PIX_FMT_MEDIACODEC
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
Definition: pixfmt.h:316
AVCOL_PRI_SMPTE170M
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:563
AV_PIX_FMT_YUVA422P10LE
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: pixfmt.h:184
AV_PIX_FMT_BAYER_GRBG16LE
@ AV_PIX_FMT_BAYER_GRBG16LE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:295
av_color_range_name
const char * av_color_range_name(enum AVColorRange range)
Definition: pixdesc.c:3281
AV_PIX_FMT_YUV444P9BE
@ AV_PIX_FMT_YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:159
AV_PIX_FMT_YUV422P10BE
@ AV_PIX_FMT_YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:157
AV_PIX_FMT_YUV422P16LE
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:130
AVCOL_TRC_RESERVED0
@ AVCOL_TRC_RESERVED0
Definition: pixfmt.h:581
AV_PIX_FMT_RGB565LE
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: pixfmt.h:113
AV_PIX_FMT_GBRAPF32BE
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
Definition: pixfmt.h:343
AV_PIX_FMT_GBRAP12BE
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
Definition: pixfmt.h:310
AV_PIX_FMT_P012LE
@ AV_PIX_FMT_P012LE
like NV12, with 12bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:408
NULL
#define NULL
Definition: coverity.c:32
AVComponentDescriptor
Definition: pixdesc.h:30
AVPixFmtDescriptor::nb_components
uint8_t nb_components
The number of components each pixel has, (1-4)
Definition: pixdesc.h:71
AV_WB16
#define AV_WB16(p, v)
Definition: intreadwrite.h:403
AVCHROMA_LOC_LEFT
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
Definition: pixfmt.h:707
AV_PIX_FMT_YUYV422
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:74
FF_LOSS_DEPTH
#define FF_LOSS_DEPTH
loss due to color depth change
Definition: pixdesc.h:388
AVCHROMA_LOC_TOPLEFT
@ AVCHROMA_LOC_TOPLEFT
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
Definition: pixfmt.h:709
AVCOL_TRC_IEC61966_2_4
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
Definition: pixfmt.h:592
AV_PIX_FMT_P210BE
@ AV_PIX_FMT_P210BE
interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, big-endian
Definition: pixfmt.h:389
AV_PIX_FMT_RGB48LE
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:110
AV_PIX_FMT_YA16LE
@ AV_PIX_FMT_YA16LE
16 bits gray, 16 bits alpha (little-endian)
Definition: pixfmt.h:210
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:85
AV_PIX_FMT_MONOBLACK
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:83
AV_PIX_FMT_YUVA422P12LE
@ AV_PIX_FMT_YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
Definition: pixfmt.h:367
AVCOL_PRI_BT709
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
Definition: pixfmt.h:557
AV_PIX_FMT_BGR565LE
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
Definition: pixfmt.h:118
AV_PIX_FMT_RGBA64LE
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:203
FF_COLOR_YUV_JPEG
#define FF_COLOR_YUV_JPEG
YUV color space.
Definition: pixdesc.c:3042
AV_PIX_FMT_YUVA444P12BE
@ AV_PIX_FMT_YUVA444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
Definition: pixfmt.h:368
AV_PIX_FMT_YUVA444P9LE
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
Definition: pixfmt.h:180
AV_PIX_FMT_Y210LE
@ AV_PIX_FMT_Y210LE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
Definition: pixfmt.h:382
av_color_primaries_name
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
Definition: pixdesc.c:3299
AV_PIX_FMT_YUVA420P16LE
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: pixfmt.h:188
AVCOL_TRC_BT2020_10
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
Definition: pixfmt.h:595
AV_PIX_FMT_RGB8
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)
Definition: pixfmt.h:93
AV_PIX_FMT_BGR0
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: pixfmt.h:265
AVCOL_SPC_YCGCO
@ AVCOL_SPC_YCGCO
used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
Definition: pixfmt.h:618
AV_PIX_FMT_OPENCL
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
Definition: pixfmt.h:358
AV_PIX_FMT_BGR4
@ AV_PIX_FMT_BGR4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
Definition: pixfmt.h:91
AV_PIX_FMT_D3D12
@ AV_PIX_FMT_D3D12
Hardware surfaces for Direct3D 12.
Definition: pixfmt.h:440
AV_PIX_FMT_YUV440P10LE
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: pixfmt.h:298
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
AV_PIX_FMT_QSV
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
Definition: pixfmt.h:247
AV_PIX_FMT_BGR555BE
@ AV_PIX_FMT_BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:119
AV_PIX_FMT_YUVA420P9LE
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
Definition: pixfmt.h:176
av_chroma_location_pos_to_enum
enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos)
Converts swscale x/y chroma position to AVChromaLocation.
Definition: pixdesc.c:3395
pixdesc_has_alpha
#define pixdesc_has_alpha(pixdesc)
Definition: pixdesc.c:3045
AVPixFmtDescriptor::flags
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
Definition: pixdesc.h:94
AV_PIX_FMT_ABGR
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:101
AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
Definition: pixfmt.h:652
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
BAYER8_DESC_COMMON
#define BAYER8_DESC_COMMON
AV_PIX_FMT_YUV420P14LE
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:270
AVCOL_PRI_BT2020
@ AVCOL_PRI_BT2020
ITU-R BT2020.
Definition: pixfmt.h:566
AV_PIX_FMT_YUV444P14BE
@ AV_PIX_FMT_YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:277
AV_PIX_FMT_BGR4_BYTE
@ AV_PIX_FMT_BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: pixfmt.h:92
AV_WB32
#define AV_WB32(p, v)
Definition: intreadwrite.h:417
AV_PIX_FMT_X2RGB10LE
@ AV_PIX_FMT_X2RGB10LE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:384
AV_PIX_FMT_P212LE
@ AV_PIX_FMT_P212LE
interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian
Definition: pixfmt.h:427
AV_PIX_FMT_YUV420P9BE
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
Definition: pixfmt.h:153
get_color_type
static int get_color_type(const AVPixFmtDescriptor *desc)
Definition: pixdesc.c:3049
color_transfer_names
static const char *const color_transfer_names[]
Definition: pixdesc.c:2819
AVCOL_TRC_SMPTE2084
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
Definition: pixfmt.h:597
AVCOL_PRI_SMPTE431
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition: pixfmt.h:569
AV_PIX_FMT_RGBF32BE
@ AV_PIX_FMT_RGBF32BE
IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian.
Definition: pixfmt.h:420
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:75
AV_PIX_FMT_YUV440P12LE
@ AV_PIX_FMT_YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: pixfmt.h:300
AVCOL_TRC_SMPTE240M
@ AVCOL_TRC_SMPTE240M
Definition: pixfmt.h:588
av_get_pix_fmt_loss
int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, int has_alpha)
Compute what kind of losses will occur when converting from one specific pixel format to another.
Definition: pixdesc.c:3233
AVCOL_PRI_FILM
@ AVCOL_PRI_FILM
colour filters using Illuminant C
Definition: pixfmt.h:565
av_get_padded_bits_per_pixel
int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel for the pixel format described by pixdesc, including any padding ...
Definition: pixdesc.c:2930
AV_PIX_FMT_FLAG_RGB
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
Definition: pixdesc.h:136
shift
static int shift(int a, int b)
Definition: bonk.c:261
AV_PIX_FMT_BAYER_BGGR16LE
@ AV_PIX_FMT_BAYER_BGGR16LE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:289
AV_PIX_FMT_YUV420P12BE
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:267
AVCOL_SPC_YCGCO_RO
@ AVCOL_SPC_YCGCO_RO
YCgCo-R, odd addition of bits.
Definition: pixfmt.h:628
AV_PIX_FMT_YUV422P10LE
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:158
AVCOL_TRC_LOG
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
Definition: pixfmt.h:590
AV_PIX_FMT_RGB444BE
@ AV_PIX_FMT_RGB444BE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
Definition: pixfmt.h:137
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
AV_PIX_FMT_XV36BE
@ AV_PIX_FMT_XV36BE
packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian,...
Definition: pixfmt.h:417
AV_PIX_FMT_YUV422P14BE
@ AV_PIX_FMT_YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:273
AV_PIX_FMT_YA16BE
@ AV_PIX_FMT_YA16BE
16 bits gray, 16 bits alpha (big-endian)
Definition: pixfmt.h:209
AV_PIX_FMT_GRAY12LE
@ AV_PIX_FMT_GRAY12LE
Y , 12bpp, little-endian.
Definition: pixfmt.h:319
AV_RB32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
Definition: bytestream.h:96
AV_PIX_FMT_GBRP9BE
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
Definition: pixfmt.h:167
AV_PIX_FMT_FLAG_BITSTREAM
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
Definition: pixdesc.h:124
AVCHROMA_LOC_UNSPECIFIED
@ AVCHROMA_LOC_UNSPECIFIED
Definition: pixfmt.h:706
AV_PIX_FMT_YUV420P10BE
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:155
AV_PIX_FMT_RGBAF16BE
@ AV_PIX_FMT_RGBAF16BE
IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian.
Definition: pixfmt.h:403
range
enum AVColorRange range
Definition: mediacodec_wrapper.c:2464
AV_PIX_FMT_NV16
@ AV_PIX_FMT_NV16
interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:198
AV_PIX_FMT_BGR444BE
@ AV_PIX_FMT_BGR444BE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
Definition: pixfmt.h:139
FF_COLOR_RGB
#define FF_COLOR_RGB
RGB color space.
Definition: pixdesc.c:3039
AV_PIX_FMT_GBRP9LE
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
Definition: pixfmt.h:168
AV_WL16
#define AV_WL16(p, v)
Definition: intreadwrite.h:410
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:174
AV_PIX_FMT_GBRAP10LE
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
Definition: pixfmt.h:314
AV_PIX_FMT_BGR565BE
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
Definition: pixfmt.h:117
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
av_pix_fmt_desc_get_id
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
Definition: pixdesc.c:2984
AV_PIX_FMT_RGB0
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: pixfmt.h:263
AV_PIX_FMT_D3D11
@ AV_PIX_FMT_D3D11
Hardware surfaces for Direct3D11.
Definition: pixfmt.h:336
av_strstart
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
Definition: avstring.c:36
AV_PIX_FMT_P012BE
@ AV_PIX_FMT_P012BE
like NV12, with 12bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:409
AV_PIX_FMT_P410LE
@ AV_PIX_FMT_P410LE
interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, little-endian
Definition: pixfmt.h:393
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: pixfmt.h:126
AV_PIX_FMT_YUVA420P10LE
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: pixfmt.h:182
AVCOL_SPC_CHROMA_DERIVED_NCL
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
Definition: pixfmt.h:623
AV_PIX_FMT_FLAG_BAYER
#define AV_PIX_FMT_FLAG_BAYER
The pixel format is following a Bayer pattern.
Definition: pixdesc.h:152
AVCOL_TRC_BT709
@ AVCOL_TRC_BT709
also ITU-R BT1361
Definition: pixfmt.h:582
AVChromaLocation
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:705
AV_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:99
AV_PIX_FMT_BGRA64LE
@ AV_PIX_FMT_BGRA64LE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:205
AV_PIX_FMT_YUVA422P10BE
@ AV_PIX_FMT_YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
Definition: pixfmt.h:183
AV_PIX_FMT_VDPAU
@ AV_PIX_FMT_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
Definition: pixfmt.h:194
AVCOL_SPC_SMPTE240M
@ AVCOL_SPC_SMPTE240M
derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
Definition: pixfmt.h:617
AV_PIX_FMT_VIDEOTOOLBOX
@ AV_PIX_FMT_VIDEOTOOLBOX
hardware decoding through Videotoolbox
Definition: pixfmt.h:305
AV_PIX_FMT_YUVA444P12LE
@ AV_PIX_FMT_YUVA444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
Definition: pixfmt.h:369
AV_PIX_FMT_YUVA422P9BE
@ AV_PIX_FMT_YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
Definition: pixfmt.h:177
AV_PIX_FMT_RGB555LE
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:115
AV_PIX_FMT_RGB48BE
@ AV_PIX_FMT_RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:109
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
AVCOL_SPC_BT2020_NCL
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
Definition: pixfmt.h:620
transfer
enum AVColorTransferCharacteristic transfer
Definition: mediacodec_wrapper.c:2492
FF_COLOR_XYZ
#define FF_COLOR_XYZ
Definition: pixdesc.c:3043
AVColorSpace
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:609
AV_PIX_FMT_GRAY9BE
@ AV_PIX_FMT_GRAY9BE
Y , 9bpp, big-endian.
Definition: pixfmt.h:338
AV_PIX_FMT_NV24
@ AV_PIX_FMT_NV24
planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:371
av_color_primaries_from_name
int av_color_primaries_from_name(const char *name)
Definition: pixdesc.c:3305
common.h
AV_PIX_FMT_BAYER_GBRG8
@ AV_PIX_FMT_BAYER_GBRG8
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
Definition: pixfmt.h:287
color_primaries_names
static const char *const color_primaries_names[AVCOL_PRI_NB]
Definition: pixdesc.c:2802
AV_PIX_FMT_NV20LE
@ AV_PIX_FMT_NV20LE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:199
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
AV_PIX_FMT_FLAG_BE
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
Definition: pixdesc.h:116
AV_PIX_FMT_YUVJ440P
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition: pixfmt.h:107
AV_PIX_FMT_XYZ12BE
@ AV_PIX_FMT_XYZ12BE
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big...
Definition: pixfmt.h:197
AV_PIX_FMT_X2RGB10BE
@ AV_PIX_FMT_X2RGB10BE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined
Definition: pixfmt.h:385
FF_COLOR_NA
#define FF_COLOR_NA
Definition: pixdesc.c:3038
AV_PIX_FMT_NV21
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
Definition: pixfmt.h:97
get_pix_fmt_score
static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, unsigned *lossp, unsigned consider)
Definition: pixdesc.c:3091
AV_PIX_FMT_RGB4_BYTE
@ AV_PIX_FMT_RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: pixfmt.h:95
AVCOL_SPC_UNSPECIFIED
@ AVCOL_SPC_UNSPECIFIED
Definition: pixfmt.h:612
AV_PIX_FMT_YUV444P16BE
@ AV_PIX_FMT_YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:133
FF_LOSS_COLORSPACE
#define FF_LOSS_COLORSPACE
loss due to color space conversion
Definition: pixdesc.h:389
FF_COLOR_YUV
#define FF_COLOR_YUV
YUV color space.
Definition: pixdesc.c:3041
AV_PIX_FMT_GBRPF32LE
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
Definition: pixfmt.h:342
AV_PIX_FMT_NV42
@ AV_PIX_FMT_NV42
as above, but U and V bytes are swapped
Definition: pixfmt.h:372
AVCOL_RANGE_MPEG
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
Definition: pixfmt.h:669
AV_PIX_FMT_GBRAP16LE
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
Definition: pixfmt.h:214
AV_PIX_FMT_PAL8
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition: pixfmt.h:84
AV_PIX_FMT_GRAY12BE
@ AV_PIX_FMT_GRAY12BE
Y , 12bpp, big-endian.
Definition: pixfmt.h:318
AV_PIX_FMT_YVYU422
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
Definition: pixfmt.h:207
AVCOL_PRI_BT470M
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: pixfmt.h:560
ret
ret
Definition: filter_design.txt:187
pixfmt.h
AV_PIX_FMT_0BGR
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
Definition: pixfmt.h:264
AV_PIX_FMT_NV12
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:96
AV_PIX_FMT_Y212LE
@ AV_PIX_FMT_Y212LE
packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:412
get_pix_fmt_internal
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
Definition: pixdesc.c:2872
AV_PIX_FMT_BAYER_BGGR16BE
@ AV_PIX_FMT_BAYER_BGGR16BE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian
Definition: pixfmt.h:290
AV_PIX_FMT_P410BE
@ AV_PIX_FMT_P410BE
interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, big-endian
Definition: pixfmt.h:392
AV_PIX_FMT_P016LE
@ AV_PIX_FMT_P016LE
like NV12, with 16bpp per component, little-endian
Definition: pixfmt.h:323
get_pix_fmt_depth
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3073
AV_PIX_FMT_GRAYF32BE
@ AV_PIX_FMT_GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
Definition: pixfmt.h:363
pos
unsigned int pos
Definition: spdifenc.c:414
AV_PIX_FMT_GBRP12BE
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
Definition: pixfmt.h:279
AV_PIX_FMT_UYVY422
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:88
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
AV_PIX_FMT_YUV444P12BE
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: pixfmt.h:275
av_get_pix_fmt
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
Definition: pixdesc.c:2897
steps
static const int16_t steps[16]
Definition: misc4.c:30
AV_PIX_FMT_RGBAF32BE
@ AV_PIX_FMT_RGBAF32BE
IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian.
Definition: pixfmt.h:423
AVCOL_TRC_ARIB_STD_B67
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
Definition: pixfmt.h:601
av_find_best_pix_fmt_of_2
enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
Compute what kind of losses will occur when converting from one specific pixel format to another.
Definition: pixdesc.c:3244
AV_PIX_FMT_Y210BE
@ AV_PIX_FMT_Y210BE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian
Definition: pixfmt.h:381
AV_PIX_FMT_FLAG_XYZ
#define AV_PIX_FMT_FLAG_XYZ
The pixel format contains XYZ-like data (as opposed to YUV/RGB/grayscale).
Definition: pixdesc.h:163
AVCHROMA_LOC_CENTER
@ AVCHROMA_LOC_CENTER
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
Definition: pixfmt.h:708
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AVCOL_SPC_FCC
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: pixfmt.h:614
AV_PIX_FMT_YUV444P9LE
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:160
av_match_name
int av_match_name(const char *name, const char *names)
Match instances of a name in a comma-separated list of names.
Definition: avstring.c:345
AVPixFmtDescriptor::comp
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
Definition: pixdesc.h:105
AV_PIX_FMT_FLAG_PLANAR
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
Definition: pixdesc.h:132
AV_PIX_FMT_P216LE
@ AV_PIX_FMT_P216LE
interleaved chroma YUV 4:2:2, 32bpp, little-endian
Definition: pixfmt.h:396
AV_PIX_FMT_RGBF32LE
@ AV_PIX_FMT_RGBF32LE
IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian.
Definition: pixfmt.h:421
AVCOL_TRC_SMPTE170M
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
Definition: pixfmt.h:587
AV_PIX_FMT_YUVA420P10BE
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
Definition: pixfmt.h:181
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AV_PIX_FMT_RGB565BE
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: pixfmt.h:112
AV_PIX_FMT_YUV420P16BE
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:129
X_NE
#define X_NE(be, le)
Definition: pixdesc.c:2894
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:165
AV_PIX_FMT_YUV422P16BE
@ AV_PIX_FMT_YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:131
AV_PIX_FMT_P212BE
@ AV_PIX_FMT_P212BE
interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian
Definition: pixfmt.h:426
desc
const char * desc
Definition: libsvtav1.c:79
AV_PIX_FMT_RGBAF32LE
@ AV_PIX_FMT_RGBAF32LE
IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian.
Definition: pixfmt.h:424
FF_LOSS_COLORQUANT
#define FF_LOSS_COLORQUANT
loss due to color quantization
Definition: pixdesc.h:391
AV_PIX_FMT_GRAY16LE
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
Definition: pixfmt.h:105
AV_PIX_FMT_X2BGR10LE
@ AV_PIX_FMT_X2BGR10LE
packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:386
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
AV_PIX_FMT_P010LE
@ AV_PIX_FMT_P010LE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:307
AV_PIX_FMT_YUVA444P10LE
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: pixfmt.h:186
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
AVCOL_TRC_RESERVED
@ AVCOL_TRC_RESERVED
Definition: pixfmt.h:584
AV_PIX_FMT_BGR555LE
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:120
AVCOL_PRI_SMPTE432
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
Definition: pixfmt.h:570
FF_LOSS_RESOLUTION
#define FF_LOSS_RESOLUTION
loss due to resolution change
Definition: pixdesc.h:387
AV_PIX_FMT_P216BE
@ AV_PIX_FMT_P216BE
interleaved chroma YUV 4:2:2, 32bpp, big-endian
Definition: pixfmt.h:395
AV_PIX_FMT_P412LE
@ AV_PIX_FMT_P412LE
interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian
Definition: pixfmt.h:430
AV_PIX_FMT_GRAY14LE
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
Definition: pixfmt.h:361
av_read_image_line
void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component)
Definition: pixdesc.c:103
AVCOL_SPC_SMPTE2085
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
Definition: pixfmt.h:622
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
AV_PIX_FMT_XV36LE
@ AV_PIX_FMT_XV36LE
packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian,...
Definition: pixfmt.h:418
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:80
AV_PIX_FMT_GRAY14BE
@ AV_PIX_FMT_GRAY14BE
Y , 14bpp, big-endian.
Definition: pixfmt.h:360
AV_PIX_FMT_YUVA422P16BE
@ AV_PIX_FMT_YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
Definition: pixfmt.h:189
AV_PIX_FMT_YUV440P10BE
@ AV_PIX_FMT_YUV440P10BE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
Definition: pixfmt.h:299
AV_PIX_FMT_YUV422P9LE
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:164
AV_PIX_FMT_YUVA422P16LE
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: pixfmt.h:190
AV_PIX_FMT_GBRP14LE
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
Definition: pixfmt.h:282
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474
AVCHROMA_LOC_NB
@ AVCHROMA_LOC_NB
Not part of ABI.
Definition: pixfmt.h:713
AV_PIX_FMT_0RGB
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: pixfmt.h:262
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:79
av_strlcpy
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
Definition: avstring.c:85
alias
Definition: mccdec.c:63
AV_PIX_FMT_GBRAP10BE
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
Definition: pixfmt.h:313
AVCOL_TRC_SMPTE428
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
Definition: pixfmt.h:599
avstring.h
AV_PIX_FMT_YUVA444P16LE
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: pixfmt.h:192
AV_PIX_FMT_VUYX
@ AV_PIX_FMT_VUYX
packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
Definition: pixfmt.h:406
av_write_image_line2
void av_write_image_line2(const void *src, uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int src_element_size)
Write the values from src to the pixel format component c of an image line.
Definition: pixdesc.c:114
AV_PIX_FMT_YUVA422P12BE
@ AV_PIX_FMT_YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
Definition: pixfmt.h:366
AVCOL_SPC_BT709
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
Definition: pixfmt.h:611
AVColorRange
AVColorRange
Visual content value range.
Definition: pixfmt.h:651
AV_PIX_FMT_FLAG_PAL
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
Definition: pixdesc.h:120
AV_PIX_FMT_BGR444LE
@ AV_PIX_FMT_BGR444LE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:138
AVCOL_SPC_ICTCP
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
Definition: pixfmt.h:625
snprintf
#define snprintf
Definition: snprintf.h:34
AV_PIX_FMT_YUV422P12LE
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:272
AV_PIX_FMT_YUVA420P9BE
@ AV_PIX_FMT_YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
Definition: pixfmt.h:175
av_color_transfer_name
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
Definition: pixdesc.c:3320
AVCHROMA_LOC_BOTTOMLEFT
@ AVCHROMA_LOC_BOTTOMLEFT
Definition: pixfmt.h:711
skip
static void BS_FUNC() skip(BSCTX *bc, unsigned int n)
Skip n bits in the buffer.
Definition: bitstream_template.h:375
AV_PIX_FMT_BAYER_GRBG8
@ AV_PIX_FMT_BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
Definition: pixfmt.h:288
AVPixFmtDescriptor::log2_chroma_h
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition: pixdesc.h:89
AV_PIX_FMT_GBRAP14LE
@ AV_PIX_FMT_GBRAP14LE
planar GBR 4:4:4:4 56bpp, little-endian
Definition: pixfmt.h:433
AV_PIX_FMT_YUVA422P
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:173
av_get_pix_fmt_name
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
Definition: pixdesc.c:2885
AV_RB16
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
Definition: bytestream.h:98
AV_PIX_FMT_UYYVYY411
@ AV_PIX_FMT_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
Definition: pixfmt.h:89
AV_PIX_FMT_BGR48BE
@ AV_PIX_FMT_BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:145
min
float min
Definition: vorbis_enc_data.h:429
AV_PIX_FMT_YUVA422P9LE
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
Definition: pixfmt.h:178