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  int skip = x * step + comp.offset;
50  const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
51  int shift = 8 - depth - (skip & 7);
52 
53  while (w--) {
54  int val = (*p >> shift) & mask;
55  if (read_pal_component)
56  val = data[1][4*val + c];
57  shift -= step;
58  p -= shift >> 3;
59  shift &= 7;
60  if (dst_element_size == 4) *dst32++ = val;
61  else *dst16++ = val;
62  }
63  } else {
64  const uint8_t *p = data[plane] + y * linesize[plane] +
65  x * step + comp.offset;
66  int is_8bit = shift + depth <= 8;
67  int is_16bit= shift + depth <=16;
68 
69  if (is_8bit)
70  p += !!(flags & AV_PIX_FMT_FLAG_BE);
71 
72  while (w--) {
73  unsigned val;
74  if (is_8bit) val = *p;
75  else if(is_16bit) val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p);
76  else val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB32(p) : AV_RL32(p);
77  val = (val >> shift) & mask;
78  if (read_pal_component)
79  val = data[1][4 * val + c];
80  p += step;
81  if (dst_element_size == 4) *dst32++ = val;
82  else *dst16++ = val;
83  }
84  }
85 }
86 
87 void av_read_image_line(uint16_t *dst,
88  const uint8_t *data[4], const int linesize[4],
89  const AVPixFmtDescriptor *desc,
90  int x, int y, int c, int w,
91  int read_pal_component)
92 {
93  av_read_image_line2(dst, data, linesize, desc,x, y, c, w,
94  read_pal_component,
95  2);
96 }
97 
98 void av_write_image_line2(const void *src,
99  uint8_t *data[4], const int linesize[4],
100  const AVPixFmtDescriptor *desc,
101  int x, int y, int c, int w, int src_element_size)
102 {
103  AVComponentDescriptor comp = desc->comp[c];
104  int plane = comp.plane;
105  int depth = comp.depth;
106  int step = comp.step;
107  int flags = desc->flags;
108  const uint32_t *src32 = src;
109  const uint16_t *src16 = src;
110 
112  int skip = x * step + comp.offset;
113  uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
114  int shift = 8 - depth - (skip & 7);
115 
116  while (w--) {
117  *p |= (src_element_size == 4 ? *src32++ : *src16++) << shift;
118  shift -= step;
119  p -= shift >> 3;
120  shift &= 7;
121  }
122  } else {
123  int shift = comp.shift;
124  uint8_t *p = data[plane] + y * linesize[plane] +
125  x * step + comp.offset;
126 
127  if (shift + depth <= 8) {
128  p += !!(flags & AV_PIX_FMT_FLAG_BE);
129  while (w--) {
130  *p |= ((src_element_size == 4 ? *src32++ : *src16++) << shift);
131  p += step;
132  }
133  } else {
134  while (w--) {
135  unsigned s = (src_element_size == 4 ? *src32++ : *src16++);
136  if (shift + depth <= 16) {
137  if (flags & AV_PIX_FMT_FLAG_BE) {
138  uint16_t val = AV_RB16(p) | (s << shift);
139  AV_WB16(p, val);
140  } else {
141  uint16_t val = AV_RL16(p) | (s << shift);
142  AV_WL16(p, val);
143  }
144  } else {
145  if (flags & AV_PIX_FMT_FLAG_BE) {
146  uint32_t val = AV_RB32(p) | (s << shift);
147  AV_WB32(p, val);
148  } else {
149  uint32_t val = AV_RL32(p) | (s << shift);
150  AV_WL32(p, val);
151  }
152  }
153  p += step;
154  }
155  }
156  }
157 }
158 
159 void av_write_image_line(const uint16_t *src,
160  uint8_t *data[4], const int linesize[4],
161  const AVPixFmtDescriptor *desc,
162  int x, int y, int c, int w)
163 {
164  av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2);
165 }
166 
168  [AV_PIX_FMT_YUV420P] = {
169  .name = "yuv420p",
170  .nb_components = 3,
171  .log2_chroma_w = 1,
172  .log2_chroma_h = 1,
173  .comp = {
174  { 0, 1, 0, 0, 8 }, /* Y */
175  { 1, 1, 0, 0, 8 }, /* U */
176  { 2, 1, 0, 0, 8 }, /* V */
177  },
178  .flags = AV_PIX_FMT_FLAG_PLANAR,
179  },
180  [AV_PIX_FMT_YUYV422] = {
181  .name = "yuyv422",
182  .nb_components = 3,
183  .log2_chroma_w = 1,
184  .log2_chroma_h = 0,
185  .comp = {
186  { 0, 2, 0, 0, 8 }, /* Y */
187  { 0, 4, 1, 0, 8 }, /* U */
188  { 0, 4, 3, 0, 8 }, /* V */
189  },
190  },
191  [AV_PIX_FMT_YVYU422] = {
192  .name = "yvyu422",
193  .nb_components = 3,
194  .log2_chroma_w = 1,
195  .log2_chroma_h = 0,
196  .comp = {
197  { 0, 2, 0, 0, 8 }, /* Y */
198  { 0, 4, 3, 0, 8 }, /* U */
199  { 0, 4, 1, 0, 8 }, /* V */
200  },
201  },
202  [AV_PIX_FMT_Y210LE] = {
203  .name = "y210le",
204  .nb_components = 3,
205  .log2_chroma_w = 1,
206  .log2_chroma_h = 0,
207  .comp = {
208  { 0, 4, 0, 6, 10 }, /* Y */
209  { 0, 8, 2, 6, 10 }, /* U */
210  { 0, 8, 6, 6, 10 }, /* V */
211  },
212  },
213  [AV_PIX_FMT_Y210BE] = {
214  .name = "y210be",
215  .nb_components = 3,
216  .log2_chroma_w = 1,
217  .log2_chroma_h = 0,
218  .comp = {
219  { 0, 4, 0, 6, 10 }, /* Y */
220  { 0, 8, 2, 6, 10 }, /* U */
221  { 0, 8, 6, 6, 10 }, /* V */
222  },
223  .flags = AV_PIX_FMT_FLAG_BE,
224  },
225  [AV_PIX_FMT_RGB24] = {
226  .name = "rgb24",
227  .nb_components = 3,
228  .log2_chroma_w = 0,
229  .log2_chroma_h = 0,
230  .comp = {
231  { 0, 3, 0, 0, 8 }, /* R */
232  { 0, 3, 1, 0, 8 }, /* G */
233  { 0, 3, 2, 0, 8 }, /* B */
234  },
235  .flags = AV_PIX_FMT_FLAG_RGB,
236  },
237  [AV_PIX_FMT_BGR24] = {
238  .name = "bgr24",
239  .nb_components = 3,
240  .log2_chroma_w = 0,
241  .log2_chroma_h = 0,
242  .comp = {
243  { 0, 3, 2, 0, 8 }, /* R */
244  { 0, 3, 1, 0, 8 }, /* G */
245  { 0, 3, 0, 0, 8 }, /* B */
246  },
247  .flags = AV_PIX_FMT_FLAG_RGB,
248  },
250  .name = "x2rgb10le",
251  .nb_components= 3,
252  .log2_chroma_w= 0,
253  .log2_chroma_h= 0,
254  .comp = {
255  { 0, 4, 2, 4, 10 }, /* R */
256  { 0, 4, 1, 2, 10 }, /* G */
257  { 0, 4, 0, 0, 10 }, /* B */
258  },
259  .flags = AV_PIX_FMT_FLAG_RGB,
260  },
262  .name = "x2rgb10be",
263  .nb_components= 3,
264  .log2_chroma_w= 0,
265  .log2_chroma_h= 0,
266  .comp = {
267  { 0, 4, 0, 4, 10 }, /* R */
268  { 0, 4, 1, 2, 10 }, /* G */
269  { 0, 4, 2, 0, 10 }, /* B */
270  },
272  },
274  .name = "x2bgr10le",
275  .nb_components= 3,
276  .log2_chroma_w= 0,
277  .log2_chroma_h= 0,
278  .comp = {
279  { 0, 4, 0, 0, 10 }, /* R */
280  { 0, 4, 1, 2, 10 }, /* G */
281  { 0, 4, 2, 4, 10 }, /* B */
282  },
283  .flags = AV_PIX_FMT_FLAG_RGB,
284  },
286  .name = "x2bgr10be",
287  .nb_components= 3,
288  .log2_chroma_w= 0,
289  .log2_chroma_h= 0,
290  .comp = {
291  { 0, 4, 2, 0, 10 }, /* R */
292  { 0, 4, 1, 2, 10 }, /* G */
293  { 0, 4, 0, 4, 10 }, /* B */
294  },
296  },
297  [AV_PIX_FMT_YUV422P] = {
298  .name = "yuv422p",
299  .nb_components = 3,
300  .log2_chroma_w = 1,
301  .log2_chroma_h = 0,
302  .comp = {
303  { 0, 1, 0, 0, 8 }, /* Y */
304  { 1, 1, 0, 0, 8 }, /* U */
305  { 2, 1, 0, 0, 8 }, /* V */
306  },
307  .flags = AV_PIX_FMT_FLAG_PLANAR,
308  },
309  [AV_PIX_FMT_YUV444P] = {
310  .name = "yuv444p",
311  .nb_components = 3,
312  .log2_chroma_w = 0,
313  .log2_chroma_h = 0,
314  .comp = {
315  { 0, 1, 0, 0, 8 }, /* Y */
316  { 1, 1, 0, 0, 8 }, /* U */
317  { 2, 1, 0, 0, 8 }, /* V */
318  },
319  .flags = AV_PIX_FMT_FLAG_PLANAR,
320  },
321  [AV_PIX_FMT_YUV410P] = {
322  .name = "yuv410p",
323  .nb_components = 3,
324  .log2_chroma_w = 2,
325  .log2_chroma_h = 2,
326  .comp = {
327  { 0, 1, 0, 0, 8 }, /* Y */
328  { 1, 1, 0, 0, 8 }, /* U */
329  { 2, 1, 0, 0, 8 }, /* V */
330  },
331  .flags = AV_PIX_FMT_FLAG_PLANAR,
332  },
333  [AV_PIX_FMT_YUV411P] = {
334  .name = "yuv411p",
335  .nb_components = 3,
336  .log2_chroma_w = 2,
337  .log2_chroma_h = 0,
338  .comp = {
339  { 0, 1, 0, 0, 8 }, /* Y */
340  { 1, 1, 0, 0, 8 }, /* U */
341  { 2, 1, 0, 0, 8 }, /* V */
342  },
343  .flags = AV_PIX_FMT_FLAG_PLANAR,
344  },
345  [AV_PIX_FMT_YUVJ411P] = {
346  .name = "yuvj411p",
347  .nb_components = 3,
348  .log2_chroma_w = 2,
349  .log2_chroma_h = 0,
350  .comp = {
351  { 0, 1, 0, 0, 8 }, /* Y */
352  { 1, 1, 0, 0, 8 }, /* U */
353  { 2, 1, 0, 0, 8 }, /* V */
354  },
355  .flags = AV_PIX_FMT_FLAG_PLANAR,
356  },
357  [AV_PIX_FMT_GRAY8] = {
358  .name = "gray",
359  .nb_components = 1,
360  .log2_chroma_w = 0,
361  .log2_chroma_h = 0,
362  .comp = {
363  { 0, 1, 0, 0, 8 }, /* Y */
364  },
365  .alias = "gray8,y8",
366  },
368  .name = "monow",
369  .nb_components = 1,
370  .log2_chroma_w = 0,
371  .log2_chroma_h = 0,
372  .comp = {
373  { 0, 1, 0, 0, 1 }, /* Y */
374  },
375  .flags = AV_PIX_FMT_FLAG_BITSTREAM,
376  },
378  .name = "monob",
379  .nb_components = 1,
380  .log2_chroma_w = 0,
381  .log2_chroma_h = 0,
382  .comp = {
383  { 0, 1, 0, 7, 1 }, /* Y */
384  },
385  .flags = AV_PIX_FMT_FLAG_BITSTREAM,
386  },
387  [AV_PIX_FMT_PAL8] = {
388  .name = "pal8",
389  .nb_components = 1,
390  .log2_chroma_w = 0,
391  .log2_chroma_h = 0,
392  .comp = {
393  { 0, 1, 0, 0, 8 },
394  },
396  },
397  [AV_PIX_FMT_YUVJ420P] = {
398  .name = "yuvj420p",
399  .nb_components = 3,
400  .log2_chroma_w = 1,
401  .log2_chroma_h = 1,
402  .comp = {
403  { 0, 1, 0, 0, 8 }, /* Y */
404  { 1, 1, 0, 0, 8 }, /* U */
405  { 2, 1, 0, 0, 8 }, /* V */
406  },
407  .flags = AV_PIX_FMT_FLAG_PLANAR,
408  },
409  [AV_PIX_FMT_YUVJ422P] = {
410  .name = "yuvj422p",
411  .nb_components = 3,
412  .log2_chroma_w = 1,
413  .log2_chroma_h = 0,
414  .comp = {
415  { 0, 1, 0, 0, 8 }, /* Y */
416  { 1, 1, 0, 0, 8 }, /* U */
417  { 2, 1, 0, 0, 8 }, /* V */
418  },
419  .flags = AV_PIX_FMT_FLAG_PLANAR,
420  },
421  [AV_PIX_FMT_YUVJ444P] = {
422  .name = "yuvj444p",
423  .nb_components = 3,
424  .log2_chroma_w = 0,
425  .log2_chroma_h = 0,
426  .comp = {
427  { 0, 1, 0, 0, 8 }, /* Y */
428  { 1, 1, 0, 0, 8 }, /* U */
429  { 2, 1, 0, 0, 8 }, /* V */
430  },
431  .flags = AV_PIX_FMT_FLAG_PLANAR,
432  },
433 #if FF_API_XVMC
434  [AV_PIX_FMT_XVMC] = {
435  .name = "xvmc",
436  .flags = AV_PIX_FMT_FLAG_HWACCEL,
437  },
438 #endif
439  [AV_PIX_FMT_UYVY422] = {
440  .name = "uyvy422",
441  .nb_components = 3,
442  .log2_chroma_w = 1,
443  .log2_chroma_h = 0,
444  .comp = {
445  { 0, 2, 1, 0, 8 }, /* Y */
446  { 0, 4, 0, 0, 8 }, /* U */
447  { 0, 4, 2, 0, 8 }, /* V */
448  },
449  },
451  .name = "uyyvyy411",
452  .nb_components = 3,
453  .log2_chroma_w = 2,
454  .log2_chroma_h = 0,
455  .comp = {
456  { 0, 4, 1, 0, 8 }, /* Y */
457  { 0, 6, 0, 0, 8 }, /* U */
458  { 0, 6, 3, 0, 8 }, /* V */
459  },
460  },
461  [AV_PIX_FMT_BGR8] = {
462  .name = "bgr8",
463  .nb_components = 3,
464  .log2_chroma_w = 0,
465  .log2_chroma_h = 0,
466  .comp = {
467  { 0, 1, 0, 0, 3 }, /* R */
468  { 0, 1, 0, 3, 3 }, /* G */
469  { 0, 1, 0, 6, 2 }, /* B */
470  },
471  .flags = AV_PIX_FMT_FLAG_RGB,
472  },
473  [AV_PIX_FMT_BGR4] = {
474  .name = "bgr4",
475  .nb_components = 3,
476  .log2_chroma_w = 0,
477  .log2_chroma_h = 0,
478  .comp = {
479  { 0, 4, 3, 0, 1 }, /* R */
480  { 0, 4, 1, 0, 2 }, /* G */
481  { 0, 4, 0, 0, 1 }, /* B */
482  },
484  },
486  .name = "bgr4_byte",
487  .nb_components = 3,
488  .log2_chroma_w = 0,
489  .log2_chroma_h = 0,
490  .comp = {
491  { 0, 1, 0, 0, 1 }, /* R */
492  { 0, 1, 0, 1, 2 }, /* G */
493  { 0, 1, 0, 3, 1 }, /* B */
494  },
495  .flags = AV_PIX_FMT_FLAG_RGB,
496  },
497  [AV_PIX_FMT_RGB8] = {
498  .name = "rgb8",
499  .nb_components = 3,
500  .log2_chroma_w = 0,
501  .log2_chroma_h = 0,
502  .comp = {
503  { 0, 1, 0, 6, 2 }, /* R */
504  { 0, 1, 0, 3, 3 }, /* G */
505  { 0, 1, 0, 0, 3 }, /* B */
506  },
507  .flags = AV_PIX_FMT_FLAG_RGB,
508  },
509  [AV_PIX_FMT_RGB4] = {
510  .name = "rgb4",
511  .nb_components = 3,
512  .log2_chroma_w = 0,
513  .log2_chroma_h = 0,
514  .comp = {
515  { 0, 4, 0, 0, 1 }, /* R */
516  { 0, 4, 1, 0, 2 }, /* G */
517  { 0, 4, 3, 0, 1 }, /* B */
518  },
520  },
522  .name = "rgb4_byte",
523  .nb_components = 3,
524  .log2_chroma_w = 0,
525  .log2_chroma_h = 0,
526  .comp = {
527  { 0, 1, 0, 3, 1 }, /* R */
528  { 0, 1, 0, 1, 2 }, /* G */
529  { 0, 1, 0, 0, 1 }, /* B */
530  },
531  .flags = AV_PIX_FMT_FLAG_RGB,
532  },
533  [AV_PIX_FMT_NV12] = {
534  .name = "nv12",
535  .nb_components = 3,
536  .log2_chroma_w = 1,
537  .log2_chroma_h = 1,
538  .comp = {
539  { 0, 1, 0, 0, 8 }, /* Y */
540  { 1, 2, 0, 0, 8 }, /* U */
541  { 1, 2, 1, 0, 8 }, /* V */
542  },
543  .flags = AV_PIX_FMT_FLAG_PLANAR,
544  },
545  [AV_PIX_FMT_NV21] = {
546  .name = "nv21",
547  .nb_components = 3,
548  .log2_chroma_w = 1,
549  .log2_chroma_h = 1,
550  .comp = {
551  { 0, 1, 0, 0, 8 }, /* Y */
552  { 1, 2, 1, 0, 8 }, /* U */
553  { 1, 2, 0, 0, 8 }, /* V */
554  },
555  .flags = AV_PIX_FMT_FLAG_PLANAR,
556  },
557  [AV_PIX_FMT_ARGB] = {
558  .name = "argb",
559  .nb_components = 4,
560  .log2_chroma_w = 0,
561  .log2_chroma_h = 0,
562  .comp = {
563  { 0, 4, 1, 0, 8 }, /* R */
564  { 0, 4, 2, 0, 8 }, /* G */
565  { 0, 4, 3, 0, 8 }, /* B */
566  { 0, 4, 0, 0, 8 }, /* A */
567  },
569  },
570  [AV_PIX_FMT_RGBA] = {
571  .name = "rgba",
572  .nb_components = 4,
573  .log2_chroma_w = 0,
574  .log2_chroma_h = 0,
575  .comp = {
576  { 0, 4, 0, 0, 8 }, /* R */
577  { 0, 4, 1, 0, 8 }, /* G */
578  { 0, 4, 2, 0, 8 }, /* B */
579  { 0, 4, 3, 0, 8 }, /* A */
580  },
582  },
583  [AV_PIX_FMT_ABGR] = {
584  .name = "abgr",
585  .nb_components = 4,
586  .log2_chroma_w = 0,
587  .log2_chroma_h = 0,
588  .comp = {
589  { 0, 4, 3, 0, 8 }, /* R */
590  { 0, 4, 2, 0, 8 }, /* G */
591  { 0, 4, 1, 0, 8 }, /* B */
592  { 0, 4, 0, 0, 8 }, /* A */
593  },
595  },
596  [AV_PIX_FMT_BGRA] = {
597  .name = "bgra",
598  .nb_components = 4,
599  .log2_chroma_w = 0,
600  .log2_chroma_h = 0,
601  .comp = {
602  { 0, 4, 2, 0, 8 }, /* R */
603  { 0, 4, 1, 0, 8 }, /* G */
604  { 0, 4, 0, 0, 8 }, /* B */
605  { 0, 4, 3, 0, 8 }, /* A */
606  },
608  },
609  [AV_PIX_FMT_0RGB] = {
610  .name = "0rgb",
611  .nb_components= 3,
612  .log2_chroma_w= 0,
613  .log2_chroma_h= 0,
614  .comp = {
615  { 0, 4, 1, 0, 8 }, /* R */
616  { 0, 4, 2, 0, 8 }, /* G */
617  { 0, 4, 3, 0, 8 }, /* B */
618  },
619  .flags = AV_PIX_FMT_FLAG_RGB,
620  },
621  [AV_PIX_FMT_RGB0] = {
622  .name = "rgb0",
623  .nb_components= 3,
624  .log2_chroma_w= 0,
625  .log2_chroma_h= 0,
626  .comp = {
627  { 0, 4, 0, 0, 8 }, /* R */
628  { 0, 4, 1, 0, 8 }, /* G */
629  { 0, 4, 2, 0, 8 }, /* B */
630  },
631  .flags = AV_PIX_FMT_FLAG_RGB,
632  },
633  [AV_PIX_FMT_0BGR] = {
634  .name = "0bgr",
635  .nb_components= 3,
636  .log2_chroma_w= 0,
637  .log2_chroma_h= 0,
638  .comp = {
639  { 0, 4, 3, 0, 8 }, /* R */
640  { 0, 4, 2, 0, 8 }, /* G */
641  { 0, 4, 1, 0, 8 }, /* B */
642  },
643  .flags = AV_PIX_FMT_FLAG_RGB,
644  },
645  [AV_PIX_FMT_BGR0] = {
646  .name = "bgr0",
647  .nb_components= 3,
648  .log2_chroma_w= 0,
649  .log2_chroma_h= 0,
650  .comp = {
651  { 0, 4, 2, 0, 8 }, /* R */
652  { 0, 4, 1, 0, 8 }, /* G */
653  { 0, 4, 0, 0, 8 }, /* B */
654  },
655  .flags = AV_PIX_FMT_FLAG_RGB,
656  },
657  [AV_PIX_FMT_GRAY9BE] = {
658  .name = "gray9be",
659  .nb_components = 1,
660  .log2_chroma_w = 0,
661  .log2_chroma_h = 0,
662  .comp = {
663  { 0, 2, 0, 0, 9 }, /* Y */
664  },
665  .flags = AV_PIX_FMT_FLAG_BE,
666  .alias = "y9be",
667  },
668  [AV_PIX_FMT_GRAY9LE] = {
669  .name = "gray9le",
670  .nb_components = 1,
671  .log2_chroma_w = 0,
672  .log2_chroma_h = 0,
673  .comp = {
674  { 0, 2, 0, 0, 9 }, /* Y */
675  },
676  .alias = "y9le",
677  },
678  [AV_PIX_FMT_GRAY10BE] = {
679  .name = "gray10be",
680  .nb_components = 1,
681  .log2_chroma_w = 0,
682  .log2_chroma_h = 0,
683  .comp = {
684  { 0, 2, 0, 0, 10 }, /* Y */
685  },
686  .flags = AV_PIX_FMT_FLAG_BE,
687  .alias = "y10be",
688  },
689  [AV_PIX_FMT_GRAY10LE] = {
690  .name = "gray10le",
691  .nb_components = 1,
692  .log2_chroma_w = 0,
693  .log2_chroma_h = 0,
694  .comp = {
695  { 0, 2, 0, 0, 10 }, /* Y */
696  },
697  .alias = "y10le",
698  },
699  [AV_PIX_FMT_GRAY12BE] = {
700  .name = "gray12be",
701  .nb_components = 1,
702  .log2_chroma_w = 0,
703  .log2_chroma_h = 0,
704  .comp = {
705  { 0, 2, 0, 0, 12 }, /* Y */
706  },
707  .flags = AV_PIX_FMT_FLAG_BE,
708  .alias = "y12be",
709  },
710  [AV_PIX_FMT_GRAY12LE] = {
711  .name = "gray12le",
712  .nb_components = 1,
713  .log2_chroma_w = 0,
714  .log2_chroma_h = 0,
715  .comp = {
716  { 0, 2, 0, 0, 12 }, /* Y */
717  },
718  .alias = "y12le",
719  },
720  [AV_PIX_FMT_GRAY14BE] = {
721  .name = "gray14be",
722  .nb_components = 1,
723  .log2_chroma_w = 0,
724  .log2_chroma_h = 0,
725  .comp = {
726  { 0, 2, 0, 0, 14 }, /* Y */
727  },
728  .flags = AV_PIX_FMT_FLAG_BE,
729  .alias = "y14be",
730  },
731  [AV_PIX_FMT_GRAY14LE] = {
732  .name = "gray14le",
733  .nb_components = 1,
734  .log2_chroma_w = 0,
735  .log2_chroma_h = 0,
736  .comp = {
737  { 0, 2, 0, 0, 14 }, /* Y */
738  },
739  .alias = "y14le",
740  },
741  [AV_PIX_FMT_GRAY16BE] = {
742  .name = "gray16be",
743  .nb_components = 1,
744  .log2_chroma_w = 0,
745  .log2_chroma_h = 0,
746  .comp = {
747  { 0, 2, 0, 0, 16 }, /* Y */
748  },
749  .flags = AV_PIX_FMT_FLAG_BE,
750  .alias = "y16be",
751  },
752  [AV_PIX_FMT_GRAY16LE] = {
753  .name = "gray16le",
754  .nb_components = 1,
755  .log2_chroma_w = 0,
756  .log2_chroma_h = 0,
757  .comp = {
758  { 0, 2, 0, 0, 16 }, /* Y */
759  },
760  .alias = "y16le",
761  },
762  [AV_PIX_FMT_YUV440P] = {
763  .name = "yuv440p",
764  .nb_components = 3,
765  .log2_chroma_w = 0,
766  .log2_chroma_h = 1,
767  .comp = {
768  { 0, 1, 0, 0, 8 }, /* Y */
769  { 1, 1, 0, 0, 8 }, /* U */
770  { 2, 1, 0, 0, 8 }, /* V */
771  },
772  .flags = AV_PIX_FMT_FLAG_PLANAR,
773  },
774  [AV_PIX_FMT_YUVJ440P] = {
775  .name = "yuvj440p",
776  .nb_components = 3,
777  .log2_chroma_w = 0,
778  .log2_chroma_h = 1,
779  .comp = {
780  { 0, 1, 0, 0, 8 }, /* Y */
781  { 1, 1, 0, 0, 8 }, /* U */
782  { 2, 1, 0, 0, 8 }, /* V */
783  },
784  .flags = AV_PIX_FMT_FLAG_PLANAR,
785  },
787  .name = "yuv440p10le",
788  .nb_components = 3,
789  .log2_chroma_w = 0,
790  .log2_chroma_h = 1,
791  .comp = {
792  { 0, 2, 0, 0, 10 }, /* Y */
793  { 1, 2, 0, 0, 10 }, /* U */
794  { 2, 2, 0, 0, 10 }, /* V */
795  },
796  .flags = AV_PIX_FMT_FLAG_PLANAR,
797  },
799  .name = "yuv440p10be",
800  .nb_components = 3,
801  .log2_chroma_w = 0,
802  .log2_chroma_h = 1,
803  .comp = {
804  { 0, 2, 0, 0, 10 }, /* Y */
805  { 1, 2, 0, 0, 10 }, /* U */
806  { 2, 2, 0, 0, 10 }, /* V */
807  },
809  },
811  .name = "yuv440p12le",
812  .nb_components = 3,
813  .log2_chroma_w = 0,
814  .log2_chroma_h = 1,
815  .comp = {
816  { 0, 2, 0, 0, 12 }, /* Y */
817  { 1, 2, 0, 0, 12 }, /* U */
818  { 2, 2, 0, 0, 12 }, /* V */
819  },
820  .flags = AV_PIX_FMT_FLAG_PLANAR,
821  },
823  .name = "yuv440p12be",
824  .nb_components = 3,
825  .log2_chroma_w = 0,
826  .log2_chroma_h = 1,
827  .comp = {
828  { 0, 2, 0, 0, 12 }, /* Y */
829  { 1, 2, 0, 0, 12 }, /* U */
830  { 2, 2, 0, 0, 12 }, /* V */
831  },
833  },
834  [AV_PIX_FMT_YUVA420P] = {
835  .name = "yuva420p",
836  .nb_components = 4,
837  .log2_chroma_w = 1,
838  .log2_chroma_h = 1,
839  .comp = {
840  { 0, 1, 0, 0, 8 }, /* Y */
841  { 1, 1, 0, 0, 8 }, /* U */
842  { 2, 1, 0, 0, 8 }, /* V */
843  { 3, 1, 0, 0, 8 }, /* A */
844  },
846  },
847  [AV_PIX_FMT_YUVA422P] = {
848  .name = "yuva422p",
849  .nb_components = 4,
850  .log2_chroma_w = 1,
851  .log2_chroma_h = 0,
852  .comp = {
853  { 0, 1, 0, 0, 8 }, /* Y */
854  { 1, 1, 0, 0, 8 }, /* U */
855  { 2, 1, 0, 0, 8 }, /* V */
856  { 3, 1, 0, 0, 8 }, /* A */
857  },
859  },
860  [AV_PIX_FMT_YUVA444P] = {
861  .name = "yuva444p",
862  .nb_components = 4,
863  .log2_chroma_w = 0,
864  .log2_chroma_h = 0,
865  .comp = {
866  { 0, 1, 0, 0, 8 }, /* Y */
867  { 1, 1, 0, 0, 8 }, /* U */
868  { 2, 1, 0, 0, 8 }, /* V */
869  { 3, 1, 0, 0, 8 }, /* A */
870  },
872  },
874  .name = "yuva420p9be",
875  .nb_components = 4,
876  .log2_chroma_w = 1,
877  .log2_chroma_h = 1,
878  .comp = {
879  { 0, 2, 0, 0, 9 }, /* Y */
880  { 1, 2, 0, 0, 9 }, /* U */
881  { 2, 2, 0, 0, 9 }, /* V */
882  { 3, 2, 0, 0, 9 }, /* A */
883  },
885  },
887  .name = "yuva420p9le",
888  .nb_components = 4,
889  .log2_chroma_w = 1,
890  .log2_chroma_h = 1,
891  .comp = {
892  { 0, 2, 0, 0, 9 }, /* Y */
893  { 1, 2, 0, 0, 9 }, /* U */
894  { 2, 2, 0, 0, 9 }, /* V */
895  { 3, 2, 0, 0, 9 }, /* A */
896  },
898  },
900  .name = "yuva422p9be",
901  .nb_components = 4,
902  .log2_chroma_w = 1,
903  .log2_chroma_h = 0,
904  .comp = {
905  { 0, 2, 0, 0, 9 }, /* Y */
906  { 1, 2, 0, 0, 9 }, /* U */
907  { 2, 2, 0, 0, 9 }, /* V */
908  { 3, 2, 0, 0, 9 }, /* A */
909  },
911  },
913  .name = "yuva422p9le",
914  .nb_components = 4,
915  .log2_chroma_w = 1,
916  .log2_chroma_h = 0,
917  .comp = {
918  { 0, 2, 0, 0, 9 }, /* Y */
919  { 1, 2, 0, 0, 9 }, /* U */
920  { 2, 2, 0, 0, 9 }, /* V */
921  { 3, 2, 0, 0, 9 }, /* A */
922  },
924  },
926  .name = "yuva444p9be",
927  .nb_components = 4,
928  .log2_chroma_w = 0,
929  .log2_chroma_h = 0,
930  .comp = {
931  { 0, 2, 0, 0, 9 }, /* Y */
932  { 1, 2, 0, 0, 9 }, /* U */
933  { 2, 2, 0, 0, 9 }, /* V */
934  { 3, 2, 0, 0, 9 }, /* A */
935  },
937  },
939  .name = "yuva444p9le",
940  .nb_components = 4,
941  .log2_chroma_w = 0,
942  .log2_chroma_h = 0,
943  .comp = {
944  { 0, 2, 0, 0, 9 }, /* Y */
945  { 1, 2, 0, 0, 9 }, /* U */
946  { 2, 2, 0, 0, 9 }, /* V */
947  { 3, 2, 0, 0, 9 }, /* A */
948  },
950  },
952  .name = "yuva420p10be",
953  .nb_components = 4,
954  .log2_chroma_w = 1,
955  .log2_chroma_h = 1,
956  .comp = {
957  { 0, 2, 0, 0, 10 }, /* Y */
958  { 1, 2, 0, 0, 10 }, /* U */
959  { 2, 2, 0, 0, 10 }, /* V */
960  { 3, 2, 0, 0, 10 }, /* A */
961  },
963  },
965  .name = "yuva420p10le",
966  .nb_components = 4,
967  .log2_chroma_w = 1,
968  .log2_chroma_h = 1,
969  .comp = {
970  { 0, 2, 0, 0, 10 }, /* Y */
971  { 1, 2, 0, 0, 10 }, /* U */
972  { 2, 2, 0, 0, 10 }, /* V */
973  { 3, 2, 0, 0, 10 }, /* A */
974  },
976  },
978  .name = "yuva422p10be",
979  .nb_components = 4,
980  .log2_chroma_w = 1,
981  .log2_chroma_h = 0,
982  .comp = {
983  { 0, 2, 0, 0, 10 }, /* Y */
984  { 1, 2, 0, 0, 10 }, /* U */
985  { 2, 2, 0, 0, 10 }, /* V */
986  { 3, 2, 0, 0, 10 }, /* A */
987  },
989  },
991  .name = "yuva422p10le",
992  .nb_components = 4,
993  .log2_chroma_w = 1,
994  .log2_chroma_h = 0,
995  .comp = {
996  { 0, 2, 0, 0, 10 }, /* Y */
997  { 1, 2, 0, 0, 10 }, /* U */
998  { 2, 2, 0, 0, 10 }, /* V */
999  { 3, 2, 0, 0, 10 }, /* A */
1000  },
1002  },
1004  .name = "yuva444p10be",
1005  .nb_components = 4,
1006  .log2_chroma_w = 0,
1007  .log2_chroma_h = 0,
1008  .comp = {
1009  { 0, 2, 0, 0, 10 }, /* Y */
1010  { 1, 2, 0, 0, 10 }, /* U */
1011  { 2, 2, 0, 0, 10 }, /* V */
1012  { 3, 2, 0, 0, 10 }, /* A */
1013  },
1015  },
1017  .name = "yuva444p10le",
1018  .nb_components = 4,
1019  .log2_chroma_w = 0,
1020  .log2_chroma_h = 0,
1021  .comp = {
1022  { 0, 2, 0, 0, 10 }, /* Y */
1023  { 1, 2, 0, 0, 10 }, /* U */
1024  { 2, 2, 0, 0, 10 }, /* V */
1025  { 3, 2, 0, 0, 10 }, /* A */
1026  },
1028  },
1030  .name = "yuva420p16be",
1031  .nb_components = 4,
1032  .log2_chroma_w = 1,
1033  .log2_chroma_h = 1,
1034  .comp = {
1035  { 0, 2, 0, 0, 16 }, /* Y */
1036  { 1, 2, 0, 0, 16 }, /* U */
1037  { 2, 2, 0, 0, 16 }, /* V */
1038  { 3, 2, 0, 0, 16 }, /* A */
1039  },
1041  },
1043  .name = "yuva420p16le",
1044  .nb_components = 4,
1045  .log2_chroma_w = 1,
1046  .log2_chroma_h = 1,
1047  .comp = {
1048  { 0, 2, 0, 0, 16 }, /* Y */
1049  { 1, 2, 0, 0, 16 }, /* U */
1050  { 2, 2, 0, 0, 16 }, /* V */
1051  { 3, 2, 0, 0, 16 }, /* A */
1052  },
1054  },
1056  .name = "yuva422p16be",
1057  .nb_components = 4,
1058  .log2_chroma_w = 1,
1059  .log2_chroma_h = 0,
1060  .comp = {
1061  { 0, 2, 0, 0, 16 }, /* Y */
1062  { 1, 2, 0, 0, 16 }, /* U */
1063  { 2, 2, 0, 0, 16 }, /* V */
1064  { 3, 2, 0, 0, 16 }, /* A */
1065  },
1067  },
1069  .name = "yuva422p16le",
1070  .nb_components = 4,
1071  .log2_chroma_w = 1,
1072  .log2_chroma_h = 0,
1073  .comp = {
1074  { 0, 2, 0, 0, 16 }, /* Y */
1075  { 1, 2, 0, 0, 16 }, /* U */
1076  { 2, 2, 0, 0, 16 }, /* V */
1077  { 3, 2, 0, 0, 16 }, /* A */
1078  },
1080  },
1082  .name = "yuva444p16be",
1083  .nb_components = 4,
1084  .log2_chroma_w = 0,
1085  .log2_chroma_h = 0,
1086  .comp = {
1087  { 0, 2, 0, 0, 16 }, /* Y */
1088  { 1, 2, 0, 0, 16 }, /* U */
1089  { 2, 2, 0, 0, 16 }, /* V */
1090  { 3, 2, 0, 0, 16 }, /* A */
1091  },
1093  },
1095  .name = "yuva444p16le",
1096  .nb_components = 4,
1097  .log2_chroma_w = 0,
1098  .log2_chroma_h = 0,
1099  .comp = {
1100  { 0, 2, 0, 0, 16 }, /* Y */
1101  { 1, 2, 0, 0, 16 }, /* U */
1102  { 2, 2, 0, 0, 16 }, /* V */
1103  { 3, 2, 0, 0, 16 }, /* A */
1104  },
1106  },
1107  [AV_PIX_FMT_RGB48BE] = {
1108  .name = "rgb48be",
1109  .nb_components = 3,
1110  .log2_chroma_w = 0,
1111  .log2_chroma_h = 0,
1112  .comp = {
1113  { 0, 6, 0, 0, 16 }, /* R */
1114  { 0, 6, 2, 0, 16 }, /* G */
1115  { 0, 6, 4, 0, 16 }, /* B */
1116  },
1118  },
1119  [AV_PIX_FMT_RGB48LE] = {
1120  .name = "rgb48le",
1121  .nb_components = 3,
1122  .log2_chroma_w = 0,
1123  .log2_chroma_h = 0,
1124  .comp = {
1125  { 0, 6, 0, 0, 16 }, /* R */
1126  { 0, 6, 2, 0, 16 }, /* G */
1127  { 0, 6, 4, 0, 16 }, /* B */
1128  },
1129  .flags = AV_PIX_FMT_FLAG_RGB,
1130  },
1131  [AV_PIX_FMT_RGBA64BE] = {
1132  .name = "rgba64be",
1133  .nb_components = 4,
1134  .log2_chroma_w = 0,
1135  .log2_chroma_h = 0,
1136  .comp = {
1137  { 0, 8, 0, 0, 16 }, /* R */
1138  { 0, 8, 2, 0, 16 }, /* G */
1139  { 0, 8, 4, 0, 16 }, /* B */
1140  { 0, 8, 6, 0, 16 }, /* A */
1141  },
1143  },
1144  [AV_PIX_FMT_RGBA64LE] = {
1145  .name = "rgba64le",
1146  .nb_components = 4,
1147  .log2_chroma_w = 0,
1148  .log2_chroma_h = 0,
1149  .comp = {
1150  { 0, 8, 0, 0, 16 }, /* R */
1151  { 0, 8, 2, 0, 16 }, /* G */
1152  { 0, 8, 4, 0, 16 }, /* B */
1153  { 0, 8, 6, 0, 16 }, /* A */
1154  },
1156  },
1157  [AV_PIX_FMT_RGB565BE] = {
1158  .name = "rgb565be",
1159  .nb_components = 3,
1160  .log2_chroma_w = 0,
1161  .log2_chroma_h = 0,
1162  .comp = {
1163  { 0, 2, -1, 3, 5 }, /* R */
1164  { 0, 2, 0, 5, 6 }, /* G */
1165  { 0, 2, 0, 0, 5 }, /* B */
1166  },
1168  },
1169  [AV_PIX_FMT_RGB565LE] = {
1170  .name = "rgb565le",
1171  .nb_components = 3,
1172  .log2_chroma_w = 0,
1173  .log2_chroma_h = 0,
1174  .comp = {
1175  { 0, 2, 1, 3, 5 }, /* R */
1176  { 0, 2, 0, 5, 6 }, /* G */
1177  { 0, 2, 0, 0, 5 }, /* B */
1178  },
1179  .flags = AV_PIX_FMT_FLAG_RGB,
1180  },
1181  [AV_PIX_FMT_RGB555BE] = {
1182  .name = "rgb555be",
1183  .nb_components = 3,
1184  .log2_chroma_w = 0,
1185  .log2_chroma_h = 0,
1186  .comp = {
1187  { 0, 2, -1, 2, 5 }, /* R */
1188  { 0, 2, 0, 5, 5 }, /* G */
1189  { 0, 2, 0, 0, 5 }, /* B */
1190  },
1192  },
1193  [AV_PIX_FMT_RGB555LE] = {
1194  .name = "rgb555le",
1195  .nb_components = 3,
1196  .log2_chroma_w = 0,
1197  .log2_chroma_h = 0,
1198  .comp = {
1199  { 0, 2, 1, 2, 5 }, /* R */
1200  { 0, 2, 0, 5, 5 }, /* G */
1201  { 0, 2, 0, 0, 5 }, /* B */
1202  },
1203  .flags = AV_PIX_FMT_FLAG_RGB,
1204  },
1205  [AV_PIX_FMT_RGB444BE] = {
1206  .name = "rgb444be",
1207  .nb_components = 3,
1208  .log2_chroma_w = 0,
1209  .log2_chroma_h = 0,
1210  .comp = {
1211  { 0, 2, -1, 0, 4 }, /* R */
1212  { 0, 2, 0, 4, 4 }, /* G */
1213  { 0, 2, 0, 0, 4 }, /* B */
1214  },
1216  },
1217  [AV_PIX_FMT_RGB444LE] = {
1218  .name = "rgb444le",
1219  .nb_components = 3,
1220  .log2_chroma_w = 0,
1221  .log2_chroma_h = 0,
1222  .comp = {
1223  { 0, 2, 1, 0, 4 }, /* R */
1224  { 0, 2, 0, 4, 4 }, /* G */
1225  { 0, 2, 0, 0, 4 }, /* B */
1226  },
1227  .flags = AV_PIX_FMT_FLAG_RGB,
1228  },
1229  [AV_PIX_FMT_BGR48BE] = {
1230  .name = "bgr48be",
1231  .nb_components = 3,
1232  .log2_chroma_w = 0,
1233  .log2_chroma_h = 0,
1234  .comp = {
1235  { 0, 6, 4, 0, 16 }, /* R */
1236  { 0, 6, 2, 0, 16 }, /* G */
1237  { 0, 6, 0, 0, 16 }, /* B */
1238  },
1240  },
1241  [AV_PIX_FMT_BGR48LE] = {
1242  .name = "bgr48le",
1243  .nb_components = 3,
1244  .log2_chroma_w = 0,
1245  .log2_chroma_h = 0,
1246  .comp = {
1247  { 0, 6, 4, 0, 16 }, /* R */
1248  { 0, 6, 2, 0, 16 }, /* G */
1249  { 0, 6, 0, 0, 16 }, /* B */
1250  },
1251  .flags = AV_PIX_FMT_FLAG_RGB,
1252  },
1253  [AV_PIX_FMT_BGRA64BE] = {
1254  .name = "bgra64be",
1255  .nb_components = 4,
1256  .log2_chroma_w = 0,
1257  .log2_chroma_h = 0,
1258  .comp = {
1259  { 0, 8, 4, 0, 16 }, /* R */
1260  { 0, 8, 2, 0, 16 }, /* G */
1261  { 0, 8, 0, 0, 16 }, /* B */
1262  { 0, 8, 6, 0, 16 }, /* A */
1263  },
1265  },
1266  [AV_PIX_FMT_BGRA64LE] = {
1267  .name = "bgra64le",
1268  .nb_components = 4,
1269  .log2_chroma_w = 0,
1270  .log2_chroma_h = 0,
1271  .comp = {
1272  { 0, 8, 4, 0, 16 }, /* R */
1273  { 0, 8, 2, 0, 16 }, /* G */
1274  { 0, 8, 0, 0, 16 }, /* B */
1275  { 0, 8, 6, 0, 16 }, /* A */
1276  },
1278  },
1279  [AV_PIX_FMT_BGR565BE] = {
1280  .name = "bgr565be",
1281  .nb_components = 3,
1282  .log2_chroma_w = 0,
1283  .log2_chroma_h = 0,
1284  .comp = {
1285  { 0, 2, 0, 0, 5 }, /* R */
1286  { 0, 2, 0, 5, 6 }, /* G */
1287  { 0, 2, -1, 3, 5 }, /* B */
1288  },
1290  },
1291  [AV_PIX_FMT_BGR565LE] = {
1292  .name = "bgr565le",
1293  .nb_components = 3,
1294  .log2_chroma_w = 0,
1295  .log2_chroma_h = 0,
1296  .comp = {
1297  { 0, 2, 0, 0, 5 }, /* R */
1298  { 0, 2, 0, 5, 6 }, /* G */
1299  { 0, 2, 1, 3, 5 }, /* B */
1300  },
1301  .flags = AV_PIX_FMT_FLAG_RGB,
1302  },
1303  [AV_PIX_FMT_BGR555BE] = {
1304  .name = "bgr555be",
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, 5 }, /* G */
1311  { 0, 2, -1, 2, 5 }, /* B */
1312  },
1314  },
1315  [AV_PIX_FMT_BGR555LE] = {
1316  .name = "bgr555le",
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, 5 }, /* G */
1323  { 0, 2, 1, 2, 5 }, /* B */
1324  },
1325  .flags = AV_PIX_FMT_FLAG_RGB,
1326  },
1327  [AV_PIX_FMT_BGR444BE] = {
1328  .name = "bgr444be",
1329  .nb_components = 3,
1330  .log2_chroma_w = 0,
1331  .log2_chroma_h = 0,
1332  .comp = {
1333  { 0, 2, 0, 0, 4 }, /* R */
1334  { 0, 2, 0, 4, 4 }, /* G */
1335  { 0, 2, -1, 0, 4 }, /* B */
1336  },
1338  },
1339  [AV_PIX_FMT_BGR444LE] = {
1340  .name = "bgr444le",
1341  .nb_components = 3,
1342  .log2_chroma_w = 0,
1343  .log2_chroma_h = 0,
1344  .comp = {
1345  { 0, 2, 0, 0, 4 }, /* R */
1346  { 0, 2, 0, 4, 4 }, /* G */
1347  { 0, 2, 1, 0, 4 }, /* B */
1348  },
1349  .flags = AV_PIX_FMT_FLAG_RGB,
1350  },
1351  [AV_PIX_FMT_VAAPI] = {
1352  .name = "vaapi",
1353  .log2_chroma_w = 1,
1354  .log2_chroma_h = 1,
1355  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1356  },
1357  [AV_PIX_FMT_YUV420P9LE] = {
1358  .name = "yuv420p9le",
1359  .nb_components = 3,
1360  .log2_chroma_w = 1,
1361  .log2_chroma_h = 1,
1362  .comp = {
1363  { 0, 2, 0, 0, 9 }, /* Y */
1364  { 1, 2, 0, 0, 9 }, /* U */
1365  { 2, 2, 0, 0, 9 }, /* V */
1366  },
1367  .flags = AV_PIX_FMT_FLAG_PLANAR,
1368  },
1369  [AV_PIX_FMT_YUV420P9BE] = {
1370  .name = "yuv420p9be",
1371  .nb_components = 3,
1372  .log2_chroma_w = 1,
1373  .log2_chroma_h = 1,
1374  .comp = {
1375  { 0, 2, 0, 0, 9 }, /* Y */
1376  { 1, 2, 0, 0, 9 }, /* U */
1377  { 2, 2, 0, 0, 9 }, /* V */
1378  },
1380  },
1382  .name = "yuv420p10le",
1383  .nb_components = 3,
1384  .log2_chroma_w = 1,
1385  .log2_chroma_h = 1,
1386  .comp = {
1387  { 0, 2, 0, 0, 10 }, /* Y */
1388  { 1, 2, 0, 0, 10 }, /* U */
1389  { 2, 2, 0, 0, 10 }, /* V */
1390  },
1391  .flags = AV_PIX_FMT_FLAG_PLANAR,
1392  },
1394  .name = "yuv420p10be",
1395  .nb_components = 3,
1396  .log2_chroma_w = 1,
1397  .log2_chroma_h = 1,
1398  .comp = {
1399  { 0, 2, 0, 0, 10 }, /* Y */
1400  { 1, 2, 0, 0, 10 }, /* U */
1401  { 2, 2, 0, 0, 10 }, /* V */
1402  },
1404  },
1406  .name = "yuv420p12le",
1407  .nb_components = 3,
1408  .log2_chroma_w = 1,
1409  .log2_chroma_h = 1,
1410  .comp = {
1411  { 0, 2, 0, 0, 12 }, /* Y */
1412  { 1, 2, 0, 0, 12 }, /* U */
1413  { 2, 2, 0, 0, 12 }, /* V */
1414  },
1415  .flags = AV_PIX_FMT_FLAG_PLANAR,
1416  },
1418  .name = "yuv420p12be",
1419  .nb_components = 3,
1420  .log2_chroma_w = 1,
1421  .log2_chroma_h = 1,
1422  .comp = {
1423  { 0, 2, 0, 0, 12 }, /* Y */
1424  { 1, 2, 0, 0, 12 }, /* U */
1425  { 2, 2, 0, 0, 12 }, /* V */
1426  },
1428  },
1430  .name = "yuv420p14le",
1431  .nb_components = 3,
1432  .log2_chroma_w = 1,
1433  .log2_chroma_h = 1,
1434  .comp = {
1435  { 0, 2, 0, 0, 14 }, /* Y */
1436  { 1, 2, 0, 0, 14 }, /* U */
1437  { 2, 2, 0, 0, 14 }, /* V */
1438  },
1439  .flags = AV_PIX_FMT_FLAG_PLANAR,
1440  },
1442  .name = "yuv420p14be",
1443  .nb_components = 3,
1444  .log2_chroma_w = 1,
1445  .log2_chroma_h = 1,
1446  .comp = {
1447  { 0, 2, 0, 0, 14 }, /* Y */
1448  { 1, 2, 0, 0, 14 }, /* U */
1449  { 2, 2, 0, 0, 14 }, /* V */
1450  },
1452  },
1454  .name = "yuv420p16le",
1455  .nb_components = 3,
1456  .log2_chroma_w = 1,
1457  .log2_chroma_h = 1,
1458  .comp = {
1459  { 0, 2, 0, 0, 16 }, /* Y */
1460  { 1, 2, 0, 0, 16 }, /* U */
1461  { 2, 2, 0, 0, 16 }, /* V */
1462  },
1463  .flags = AV_PIX_FMT_FLAG_PLANAR,
1464  },
1466  .name = "yuv420p16be",
1467  .nb_components = 3,
1468  .log2_chroma_w = 1,
1469  .log2_chroma_h = 1,
1470  .comp = {
1471  { 0, 2, 0, 0, 16 }, /* Y */
1472  { 1, 2, 0, 0, 16 }, /* U */
1473  { 2, 2, 0, 0, 16 }, /* V */
1474  },
1476  },
1477  [AV_PIX_FMT_YUV422P9LE] = {
1478  .name = "yuv422p9le",
1479  .nb_components = 3,
1480  .log2_chroma_w = 1,
1481  .log2_chroma_h = 0,
1482  .comp = {
1483  { 0, 2, 0, 0, 9 }, /* Y */
1484  { 1, 2, 0, 0, 9 }, /* U */
1485  { 2, 2, 0, 0, 9 }, /* V */
1486  },
1487  .flags = AV_PIX_FMT_FLAG_PLANAR,
1488  },
1489  [AV_PIX_FMT_YUV422P9BE] = {
1490  .name = "yuv422p9be",
1491  .nb_components = 3,
1492  .log2_chroma_w = 1,
1493  .log2_chroma_h = 0,
1494  .comp = {
1495  { 0, 2, 0, 0, 9 }, /* Y */
1496  { 1, 2, 0, 0, 9 }, /* U */
1497  { 2, 2, 0, 0, 9 }, /* V */
1498  },
1500  },
1502  .name = "yuv422p10le",
1503  .nb_components = 3,
1504  .log2_chroma_w = 1,
1505  .log2_chroma_h = 0,
1506  .comp = {
1507  { 0, 2, 0, 0, 10 }, /* Y */
1508  { 1, 2, 0, 0, 10 }, /* U */
1509  { 2, 2, 0, 0, 10 }, /* V */
1510  },
1511  .flags = AV_PIX_FMT_FLAG_PLANAR,
1512  },
1514  .name = "yuv422p10be",
1515  .nb_components = 3,
1516  .log2_chroma_w = 1,
1517  .log2_chroma_h = 0,
1518  .comp = {
1519  { 0, 2, 0, 0, 10 }, /* Y */
1520  { 1, 2, 0, 0, 10 }, /* U */
1521  { 2, 2, 0, 0, 10 }, /* V */
1522  },
1524  },
1526  .name = "yuv422p12le",
1527  .nb_components = 3,
1528  .log2_chroma_w = 1,
1529  .log2_chroma_h = 0,
1530  .comp = {
1531  { 0, 2, 0, 0, 12 }, /* Y */
1532  { 1, 2, 0, 0, 12 }, /* U */
1533  { 2, 2, 0, 0, 12 }, /* V */
1534  },
1535  .flags = AV_PIX_FMT_FLAG_PLANAR,
1536  },
1538  .name = "yuv422p12be",
1539  .nb_components = 3,
1540  .log2_chroma_w = 1,
1541  .log2_chroma_h = 0,
1542  .comp = {
1543  { 0, 2, 0, 0, 12 }, /* Y */
1544  { 1, 2, 0, 0, 12 }, /* U */
1545  { 2, 2, 0, 0, 12 }, /* V */
1546  },
1548  },
1550  .name = "yuv422p14le",
1551  .nb_components = 3,
1552  .log2_chroma_w = 1,
1553  .log2_chroma_h = 0,
1554  .comp = {
1555  { 0, 2, 0, 0, 14 }, /* Y */
1556  { 1, 2, 0, 0, 14 }, /* U */
1557  { 2, 2, 0, 0, 14 }, /* V */
1558  },
1559  .flags = AV_PIX_FMT_FLAG_PLANAR,
1560  },
1562  .name = "yuv422p14be",
1563  .nb_components = 3,
1564  .log2_chroma_w = 1,
1565  .log2_chroma_h = 0,
1566  .comp = {
1567  { 0, 2, 0, 0, 14 }, /* Y */
1568  { 1, 2, 0, 0, 14 }, /* U */
1569  { 2, 2, 0, 0, 14 }, /* V */
1570  },
1572  },
1574  .name = "yuv422p16le",
1575  .nb_components = 3,
1576  .log2_chroma_w = 1,
1577  .log2_chroma_h = 0,
1578  .comp = {
1579  { 0, 2, 0, 0, 16 }, /* Y */
1580  { 1, 2, 0, 0, 16 }, /* U */
1581  { 2, 2, 0, 0, 16 }, /* V */
1582  },
1583  .flags = AV_PIX_FMT_FLAG_PLANAR,
1584  },
1586  .name = "yuv422p16be",
1587  .nb_components = 3,
1588  .log2_chroma_w = 1,
1589  .log2_chroma_h = 0,
1590  .comp = {
1591  { 0, 2, 0, 0, 16 }, /* Y */
1592  { 1, 2, 0, 0, 16 }, /* U */
1593  { 2, 2, 0, 0, 16 }, /* V */
1594  },
1596  },
1598  .name = "yuv444p16le",
1599  .nb_components = 3,
1600  .log2_chroma_w = 0,
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 = "yuv444p16be",
1611  .nb_components = 3,
1612  .log2_chroma_w = 0,
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 = "yuv444p10le",
1623  .nb_components = 3,
1624  .log2_chroma_w = 0,
1625  .log2_chroma_h = 0,
1626  .comp = {
1627  { 0, 2, 0, 0, 10 }, /* Y */
1628  { 1, 2, 0, 0, 10 }, /* U */
1629  { 2, 2, 0, 0, 10 }, /* V */
1630  },
1631  .flags = AV_PIX_FMT_FLAG_PLANAR,
1632  },
1634  .name = "yuv444p10be",
1635  .nb_components = 3,
1636  .log2_chroma_w = 0,
1637  .log2_chroma_h = 0,
1638  .comp = {
1639  { 0, 2, 0, 0, 10 }, /* Y */
1640  { 1, 2, 0, 0, 10 }, /* U */
1641  { 2, 2, 0, 0, 10 }, /* V */
1642  },
1644  },
1645  [AV_PIX_FMT_YUV444P9LE] = {
1646  .name = "yuv444p9le",
1647  .nb_components = 3,
1648  .log2_chroma_w = 0,
1649  .log2_chroma_h = 0,
1650  .comp = {
1651  { 0, 2, 0, 0, 9 }, /* Y */
1652  { 1, 2, 0, 0, 9 }, /* U */
1653  { 2, 2, 0, 0, 9 }, /* V */
1654  },
1655  .flags = AV_PIX_FMT_FLAG_PLANAR,
1656  },
1657  [AV_PIX_FMT_YUV444P9BE] = {
1658  .name = "yuv444p9be",
1659  .nb_components = 3,
1660  .log2_chroma_w = 0,
1661  .log2_chroma_h = 0,
1662  .comp = {
1663  { 0, 2, 0, 0, 9 }, /* Y */
1664  { 1, 2, 0, 0, 9 }, /* U */
1665  { 2, 2, 0, 0, 9 }, /* V */
1666  },
1668  },
1670  .name = "yuv444p12le",
1671  .nb_components = 3,
1672  .log2_chroma_w = 0,
1673  .log2_chroma_h = 0,
1674  .comp = {
1675  { 0, 2, 0, 0, 12 }, /* Y */
1676  { 1, 2, 0, 0, 12 }, /* U */
1677  { 2, 2, 0, 0, 12 }, /* V */
1678  },
1679  .flags = AV_PIX_FMT_FLAG_PLANAR,
1680  },
1682  .name = "yuv444p12be",
1683  .nb_components = 3,
1684  .log2_chroma_w = 0,
1685  .log2_chroma_h = 0,
1686  .comp = {
1687  { 0, 2, 0, 0, 12 }, /* Y */
1688  { 1, 2, 0, 0, 12 }, /* U */
1689  { 2, 2, 0, 0, 12 }, /* V */
1690  },
1692  },
1694  .name = "yuv444p14le",
1695  .nb_components = 3,
1696  .log2_chroma_w = 0,
1697  .log2_chroma_h = 0,
1698  .comp = {
1699  { 0, 2, 0, 0, 14 }, /* Y */
1700  { 1, 2, 0, 0, 14 }, /* U */
1701  { 2, 2, 0, 0, 14 }, /* V */
1702  },
1703  .flags = AV_PIX_FMT_FLAG_PLANAR,
1704  },
1706  .name = "yuv444p14be",
1707  .nb_components = 3,
1708  .log2_chroma_w = 0,
1709  .log2_chroma_h = 0,
1710  .comp = {
1711  { 0, 2, 0, 0, 14 }, /* Y */
1712  { 1, 2, 0, 0, 14 }, /* U */
1713  { 2, 2, 0, 0, 14 }, /* V */
1714  },
1716  },
1718  .name = "d3d11va_vld",
1719  .log2_chroma_w = 1,
1720  .log2_chroma_h = 1,
1721  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1722  },
1723  [AV_PIX_FMT_DXVA2_VLD] = {
1724  .name = "dxva2_vld",
1725  .log2_chroma_w = 1,
1726  .log2_chroma_h = 1,
1727  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1728  },
1729  [AV_PIX_FMT_YA8] = {
1730  .name = "ya8",
1731  .nb_components = 2,
1732  .comp = {
1733  { 0, 2, 0, 0, 8 }, /* Y */
1734  { 0, 2, 1, 0, 8 }, /* A */
1735  },
1736  .flags = AV_PIX_FMT_FLAG_ALPHA,
1737  .alias = "gray8a",
1738  },
1739  [AV_PIX_FMT_YA16LE] = {
1740  .name = "ya16le",
1741  .nb_components = 2,
1742  .comp = {
1743  { 0, 4, 0, 0, 16 }, /* Y */
1744  { 0, 4, 2, 0, 16 }, /* A */
1745  },
1746  .flags = AV_PIX_FMT_FLAG_ALPHA,
1747  },
1748  [AV_PIX_FMT_YA16BE] = {
1749  .name = "ya16be",
1750  .nb_components = 2,
1751  .comp = {
1752  { 0, 4, 0, 0, 16 }, /* Y */
1753  { 0, 4, 2, 0, 16 }, /* A */
1754  },
1756  },
1758  .name = "videotoolbox_vld",
1759  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1760  },
1761  [AV_PIX_FMT_GBRP] = {
1762  .name = "gbrp",
1763  .nb_components = 3,
1764  .log2_chroma_w = 0,
1765  .log2_chroma_h = 0,
1766  .comp = {
1767  { 2, 1, 0, 0, 8 }, /* R */
1768  { 0, 1, 0, 0, 8 }, /* G */
1769  { 1, 1, 0, 0, 8 }, /* B */
1770  },
1772  },
1773  [AV_PIX_FMT_GBRP9LE] = {
1774  .name = "gbrp9le",
1775  .nb_components = 3,
1776  .log2_chroma_w = 0,
1777  .log2_chroma_h = 0,
1778  .comp = {
1779  { 2, 2, 0, 0, 9 }, /* R */
1780  { 0, 2, 0, 0, 9 }, /* G */
1781  { 1, 2, 0, 0, 9 }, /* B */
1782  },
1784  },
1785  [AV_PIX_FMT_GBRP9BE] = {
1786  .name = "gbrp9be",
1787  .nb_components = 3,
1788  .log2_chroma_w = 0,
1789  .log2_chroma_h = 0,
1790  .comp = {
1791  { 2, 2, 0, 0, 9 }, /* R */
1792  { 0, 2, 0, 0, 9 }, /* G */
1793  { 1, 2, 0, 0, 9 }, /* B */
1794  },
1796  },
1797  [AV_PIX_FMT_GBRP10LE] = {
1798  .name = "gbrp10le",
1799  .nb_components = 3,
1800  .log2_chroma_w = 0,
1801  .log2_chroma_h = 0,
1802  .comp = {
1803  { 2, 2, 0, 0, 10 }, /* R */
1804  { 0, 2, 0, 0, 10 }, /* G */
1805  { 1, 2, 0, 0, 10 }, /* B */
1806  },
1808  },
1809  [AV_PIX_FMT_GBRP10BE] = {
1810  .name = "gbrp10be",
1811  .nb_components = 3,
1812  .log2_chroma_w = 0,
1813  .log2_chroma_h = 0,
1814  .comp = {
1815  { 2, 2, 0, 0, 10 }, /* R */
1816  { 0, 2, 0, 0, 10 }, /* G */
1817  { 1, 2, 0, 0, 10 }, /* B */
1818  },
1820  },
1821  [AV_PIX_FMT_GBRP12LE] = {
1822  .name = "gbrp12le",
1823  .nb_components = 3,
1824  .log2_chroma_w = 0,
1825  .log2_chroma_h = 0,
1826  .comp = {
1827  { 2, 2, 0, 0, 12 }, /* R */
1828  { 0, 2, 0, 0, 12 }, /* G */
1829  { 1, 2, 0, 0, 12 }, /* B */
1830  },
1832  },
1833  [AV_PIX_FMT_GBRP12BE] = {
1834  .name = "gbrp12be",
1835  .nb_components = 3,
1836  .log2_chroma_w = 0,
1837  .log2_chroma_h = 0,
1838  .comp = {
1839  { 2, 2, 0, 0, 12 }, /* R */
1840  { 0, 2, 0, 0, 12 }, /* G */
1841  { 1, 2, 0, 0, 12 }, /* B */
1842  },
1844  },
1845  [AV_PIX_FMT_GBRP14LE] = {
1846  .name = "gbrp14le",
1847  .nb_components = 3,
1848  .log2_chroma_w = 0,
1849  .log2_chroma_h = 0,
1850  .comp = {
1851  { 2, 2, 0, 0, 14 }, /* R */
1852  { 0, 2, 0, 0, 14 }, /* G */
1853  { 1, 2, 0, 0, 14 }, /* B */
1854  },
1856  },
1857  [AV_PIX_FMT_GBRP14BE] = {
1858  .name = "gbrp14be",
1859  .nb_components = 3,
1860  .log2_chroma_w = 0,
1861  .log2_chroma_h = 0,
1862  .comp = {
1863  { 2, 2, 0, 0, 14 }, /* R */
1864  { 0, 2, 0, 0, 14 }, /* G */
1865  { 1, 2, 0, 0, 14 }, /* B */
1866  },
1868  },
1869  [AV_PIX_FMT_GBRP16LE] = {
1870  .name = "gbrp16le",
1871  .nb_components = 3,
1872  .log2_chroma_w = 0,
1873  .log2_chroma_h = 0,
1874  .comp = {
1875  { 2, 2, 0, 0, 16 }, /* R */
1876  { 0, 2, 0, 0, 16 }, /* G */
1877  { 1, 2, 0, 0, 16 }, /* B */
1878  },
1880  },
1881  [AV_PIX_FMT_GBRP16BE] = {
1882  .name = "gbrp16be",
1883  .nb_components = 3,
1884  .log2_chroma_w = 0,
1885  .log2_chroma_h = 0,
1886  .comp = {
1887  { 2, 2, 0, 0, 16 }, /* R */
1888  { 0, 2, 0, 0, 16 }, /* G */
1889  { 1, 2, 0, 0, 16 }, /* B */
1890  },
1892  },
1893  [AV_PIX_FMT_GBRAP] = {
1894  .name = "gbrap",
1895  .nb_components = 4,
1896  .log2_chroma_w = 0,
1897  .log2_chroma_h = 0,
1898  .comp = {
1899  { 2, 1, 0, 0, 8 }, /* R */
1900  { 0, 1, 0, 0, 8 }, /* G */
1901  { 1, 1, 0, 0, 8 }, /* B */
1902  { 3, 1, 0, 0, 8 }, /* A */
1903  },
1906  },
1907  [AV_PIX_FMT_GBRAP16LE] = {
1908  .name = "gbrap16le",
1909  .nb_components = 4,
1910  .log2_chroma_w = 0,
1911  .log2_chroma_h = 0,
1912  .comp = {
1913  { 2, 2, 0, 0, 16 }, /* R */
1914  { 0, 2, 0, 0, 16 }, /* G */
1915  { 1, 2, 0, 0, 16 }, /* B */
1916  { 3, 2, 0, 0, 16 }, /* A */
1917  },
1920  },
1921  [AV_PIX_FMT_GBRAP16BE] = {
1922  .name = "gbrap16be",
1923  .nb_components = 4,
1924  .log2_chroma_w = 0,
1925  .log2_chroma_h = 0,
1926  .comp = {
1927  { 2, 2, 0, 0, 16 }, /* R */
1928  { 0, 2, 0, 0, 16 }, /* G */
1929  { 1, 2, 0, 0, 16 }, /* B */
1930  { 3, 2, 0, 0, 16 }, /* A */
1931  },
1934  },
1935  [AV_PIX_FMT_VDPAU] = {
1936  .name = "vdpau",
1937  .log2_chroma_w = 1,
1938  .log2_chroma_h = 1,
1939  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1940  },
1941  [AV_PIX_FMT_XYZ12LE] = {
1942  .name = "xyz12le",
1943  .nb_components = 3,
1944  .log2_chroma_w = 0,
1945  .log2_chroma_h = 0,
1946  .comp = {
1947  { 0, 6, 0, 4, 12 }, /* X */
1948  { 0, 6, 2, 4, 12 }, /* Y */
1949  { 0, 6, 4, 4, 12 }, /* Z */
1950  },
1951  /*.flags = -- not used*/
1952  },
1953  [AV_PIX_FMT_XYZ12BE] = {
1954  .name = "xyz12be",
1955  .nb_components = 3,
1956  .log2_chroma_w = 0,
1957  .log2_chroma_h = 0,
1958  .comp = {
1959  { 0, 6, 0, 4, 12 }, /* X */
1960  { 0, 6, 2, 4, 12 }, /* Y */
1961  { 0, 6, 4, 4, 12 }, /* Z */
1962  },
1963  .flags = AV_PIX_FMT_FLAG_BE,
1964  },
1965 
1966 #define BAYER8_DESC_COMMON \
1967  .nb_components= 3, \
1968  .log2_chroma_w= 0, \
1969  .log2_chroma_h= 0, \
1970  .comp = { \
1971  { 0, 1, 0, 0, 2 }, \
1972  { 0, 1, 0, 0, 4 }, \
1973  { 0, 1, 0, 0, 2 }, \
1974  }, \
1975 
1976 #define BAYER16_DESC_COMMON \
1977  .nb_components= 3, \
1978  .log2_chroma_w= 0, \
1979  .log2_chroma_h= 0, \
1980  .comp = { \
1981  { 0, 2, 0, 0, 4 }, \
1982  { 0, 2, 0, 0, 8 }, \
1983  { 0, 2, 0, 0, 4 }, \
1984  }, \
1985 
1987  .name = "bayer_bggr8",
1990  },
1992  .name = "bayer_bggr16le",
1995  },
1997  .name = "bayer_bggr16be",
2000  },
2002  .name = "bayer_rggb8",
2005  },
2007  .name = "bayer_rggb16le",
2010  },
2012  .name = "bayer_rggb16be",
2015  },
2017  .name = "bayer_gbrg8",
2020  },
2022  .name = "bayer_gbrg16le",
2025  },
2027  .name = "bayer_gbrg16be",
2030  },
2032  .name = "bayer_grbg8",
2035  },
2037  .name = "bayer_grbg16le",
2040  },
2042  .name = "bayer_grbg16be",
2045  },
2046  [AV_PIX_FMT_NV16] = {
2047  .name = "nv16",
2048  .nb_components = 3,
2049  .log2_chroma_w = 1,
2050  .log2_chroma_h = 0,
2051  .comp = {
2052  { 0, 1, 0, 0, 8 }, /* Y */
2053  { 1, 2, 0, 0, 8 }, /* U */
2054  { 1, 2, 1, 0, 8 }, /* V */
2055  },
2056  .flags = AV_PIX_FMT_FLAG_PLANAR,
2057  },
2058  [AV_PIX_FMT_NV20LE] = {
2059  .name = "nv20le",
2060  .nb_components = 3,
2061  .log2_chroma_w = 1,
2062  .log2_chroma_h = 0,
2063  .comp = {
2064  { 0, 2, 0, 0, 10 }, /* Y */
2065  { 1, 4, 0, 0, 10 }, /* U */
2066  { 1, 4, 2, 0, 10 }, /* V */
2067  },
2068  .flags = AV_PIX_FMT_FLAG_PLANAR,
2069  },
2070  [AV_PIX_FMT_NV20BE] = {
2071  .name = "nv20be",
2072  .nb_components = 3,
2073  .log2_chroma_w = 1,
2074  .log2_chroma_h = 0,
2075  .comp = {
2076  { 0, 2, 0, 0, 10 }, /* Y */
2077  { 1, 4, 0, 0, 10 }, /* U */
2078  { 1, 4, 2, 0, 10 }, /* V */
2079  },
2081  },
2082  [AV_PIX_FMT_QSV] = {
2083  .name = "qsv",
2084  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2085  },
2086  [AV_PIX_FMT_MEDIACODEC] = {
2087  .name = "mediacodec",
2088  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2089  },
2090  [AV_PIX_FMT_MMAL] = {
2091  .name = "mmal",
2092  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2093  },
2094  [AV_PIX_FMT_CUDA] = {
2095  .name = "cuda",
2096  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2097  },
2098  [AV_PIX_FMT_AYUV64LE] = {
2099  .name = "ayuv64le",
2100  .nb_components = 4,
2101  .log2_chroma_w = 0,
2102  .log2_chroma_h = 0,
2103  .comp = {
2104  { 0, 8, 2, 0, 16 }, /* Y */
2105  { 0, 8, 4, 0, 16 }, /* U */
2106  { 0, 8, 6, 0, 16 }, /* V */
2107  { 0, 8, 0, 0, 16 }, /* A */
2108  },
2109  .flags = AV_PIX_FMT_FLAG_ALPHA,
2110  },
2111  [AV_PIX_FMT_AYUV64BE] = {
2112  .name = "ayuv64be",
2113  .nb_components = 4,
2114  .log2_chroma_w = 0,
2115  .log2_chroma_h = 0,
2116  .comp = {
2117  { 0, 8, 2, 0, 16 }, /* Y */
2118  { 0, 8, 4, 0, 16 }, /* U */
2119  { 0, 8, 6, 0, 16 }, /* V */
2120  { 0, 8, 0, 0, 16 }, /* A */
2121  },
2123  },
2124  [AV_PIX_FMT_P010LE] = {
2125  .name = "p010le",
2126  .nb_components = 3,
2127  .log2_chroma_w = 1,
2128  .log2_chroma_h = 1,
2129  .comp = {
2130  { 0, 2, 0, 6, 10 }, /* Y */
2131  { 1, 4, 0, 6, 10 }, /* U */
2132  { 1, 4, 2, 6, 10 }, /* V */
2133  },
2134  .flags = AV_PIX_FMT_FLAG_PLANAR,
2135  },
2136  [AV_PIX_FMT_P010BE] = {
2137  .name = "p010be",
2138  .nb_components = 3,
2139  .log2_chroma_w = 1,
2140  .log2_chroma_h = 1,
2141  .comp = {
2142  { 0, 2, 0, 6, 10 }, /* Y */
2143  { 1, 4, 0, 6, 10 }, /* U */
2144  { 1, 4, 2, 6, 10 }, /* V */
2145  },
2147  },
2148  [AV_PIX_FMT_P012LE] = {
2149  .name = "p012le",
2150  .nb_components = 3,
2151  .log2_chroma_w = 1,
2152  .log2_chroma_h = 1,
2153  .comp = {
2154  { 0, 2, 0, 4, 12 }, /* Y */
2155  { 1, 4, 0, 4, 12 }, /* U */
2156  { 1, 4, 2, 4, 12 }, /* V */
2157  },
2158  .flags = AV_PIX_FMT_FLAG_PLANAR,
2159  },
2160  [AV_PIX_FMT_P012BE] = {
2161  .name = "p012be",
2162  .nb_components = 3,
2163  .log2_chroma_w = 1,
2164  .log2_chroma_h = 1,
2165  .comp = {
2166  { 0, 2, 0, 4, 12 }, /* Y */
2167  { 1, 4, 0, 4, 12 }, /* U */
2168  { 1, 4, 2, 4, 12 }, /* V */
2169  },
2171  },
2172  [AV_PIX_FMT_P016LE] = {
2173  .name = "p016le",
2174  .nb_components = 3,
2175  .log2_chroma_w = 1,
2176  .log2_chroma_h = 1,
2177  .comp = {
2178  { 0, 2, 0, 0, 16 }, /* Y */
2179  { 1, 4, 0, 0, 16 }, /* U */
2180  { 1, 4, 2, 0, 16 }, /* V */
2181  },
2182  .flags = AV_PIX_FMT_FLAG_PLANAR,
2183  },
2184  [AV_PIX_FMT_P016BE] = {
2185  .name = "p016be",
2186  .nb_components = 3,
2187  .log2_chroma_w = 1,
2188  .log2_chroma_h = 1,
2189  .comp = {
2190  { 0, 2, 0, 0, 16 }, /* Y */
2191  { 1, 4, 0, 0, 16 }, /* U */
2192  { 1, 4, 2, 0, 16 }, /* V */
2193  },
2195  },
2196  [AV_PIX_FMT_GBRAP12LE] = {
2197  .name = "gbrap12le",
2198  .nb_components = 4,
2199  .log2_chroma_w = 0,
2200  .log2_chroma_h = 0,
2201  .comp = {
2202  { 2, 2, 0, 0, 12 }, /* R */
2203  { 0, 2, 0, 0, 12 }, /* G */
2204  { 1, 2, 0, 0, 12 }, /* B */
2205  { 3, 2, 0, 0, 12 }, /* A */
2206  },
2209  },
2210  [AV_PIX_FMT_GBRAP12BE] = {
2211  .name = "gbrap12be",
2212  .nb_components = 4,
2213  .log2_chroma_w = 0,
2214  .log2_chroma_h = 0,
2215  .comp = {
2216  { 2, 2, 0, 0, 12 }, /* R */
2217  { 0, 2, 0, 0, 12 }, /* G */
2218  { 1, 2, 0, 0, 12 }, /* B */
2219  { 3, 2, 0, 0, 12 }, /* A */
2220  },
2223  },
2224  [AV_PIX_FMT_GBRAP10LE] = {
2225  .name = "gbrap10le",
2226  .nb_components = 4,
2227  .log2_chroma_w = 0,
2228  .log2_chroma_h = 0,
2229  .comp = {
2230  { 2, 2, 0, 0, 10 }, /* R */
2231  { 0, 2, 0, 0, 10 }, /* G */
2232  { 1, 2, 0, 0, 10 }, /* B */
2233  { 3, 2, 0, 0, 10 }, /* A */
2234  },
2237  },
2238  [AV_PIX_FMT_GBRAP10BE] = {
2239  .name = "gbrap10be",
2240  .nb_components = 4,
2241  .log2_chroma_w = 0,
2242  .log2_chroma_h = 0,
2243  .comp = {
2244  { 2, 2, 0, 0, 10 }, /* R */
2245  { 0, 2, 0, 0, 10 }, /* G */
2246  { 1, 2, 0, 0, 10 }, /* B */
2247  { 3, 2, 0, 0, 10 }, /* A */
2248  },
2251  },
2252  [AV_PIX_FMT_D3D11] = {
2253  .name = "d3d11",
2254  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2255  },
2256  [AV_PIX_FMT_GBRPF32BE] = {
2257  .name = "gbrpf32be",
2258  .nb_components = 3,
2259  .log2_chroma_w = 0,
2260  .log2_chroma_h = 0,
2261  .comp = {
2262  { 2, 4, 0, 0, 32 }, /* R */
2263  { 0, 4, 0, 0, 32 }, /* G */
2264  { 1, 4, 0, 0, 32 }, /* B */
2265  },
2268  },
2269  [AV_PIX_FMT_GBRPF32LE] = {
2270  .name = "gbrpf32le",
2271  .nb_components = 3,
2272  .log2_chroma_w = 0,
2273  .log2_chroma_h = 0,
2274  .comp = {
2275  { 2, 4, 0, 0, 32 }, /* R */
2276  { 0, 4, 0, 0, 32 }, /* G */
2277  { 1, 4, 0, 0, 32 }, /* B */
2278  },
2280  },
2281  [AV_PIX_FMT_GBRAPF32BE] = {
2282  .name = "gbrapf32be",
2283  .nb_components = 4,
2284  .log2_chroma_w = 0,
2285  .log2_chroma_h = 0,
2286  .comp = {
2287  { 2, 4, 0, 0, 32 }, /* R */
2288  { 0, 4, 0, 0, 32 }, /* G */
2289  { 1, 4, 0, 0, 32 }, /* B */
2290  { 3, 4, 0, 0, 32 }, /* A */
2291  },
2295  },
2296  [AV_PIX_FMT_GBRAPF32LE] = {
2297  .name = "gbrapf32le",
2298  .nb_components = 4,
2299  .log2_chroma_w = 0,
2300  .log2_chroma_h = 0,
2301  .comp = {
2302  { 2, 4, 0, 0, 32 }, /* R */
2303  { 0, 4, 0, 0, 32 }, /* G */
2304  { 1, 4, 0, 0, 32 }, /* B */
2305  { 3, 4, 0, 0, 32 }, /* A */
2306  },
2309  },
2310  [AV_PIX_FMT_DRM_PRIME] = {
2311  .name = "drm_prime",
2312  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2313  },
2314  [AV_PIX_FMT_OPENCL] = {
2315  .name = "opencl",
2316  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2317  },
2318  [AV_PIX_FMT_GRAYF32BE] = {
2319  .name = "grayf32be",
2320  .nb_components = 1,
2321  .log2_chroma_w = 0,
2322  .log2_chroma_h = 0,
2323  .comp = {
2324  { 0, 4, 0, 0, 32 }, /* Y */
2325  },
2327  .alias = "yf32be",
2328  },
2329  [AV_PIX_FMT_GRAYF32LE] = {
2330  .name = "grayf32le",
2331  .nb_components = 1,
2332  .log2_chroma_w = 0,
2333  .log2_chroma_h = 0,
2334  .comp = {
2335  { 0, 4, 0, 0, 32 }, /* Y */
2336  },
2337  .flags = AV_PIX_FMT_FLAG_FLOAT,
2338  .alias = "yf32le",
2339  },
2341  .name = "yuva422p12be",
2342  .nb_components = 4,
2343  .log2_chroma_w = 1,
2344  .log2_chroma_h = 0,
2345  .comp = {
2346  { 0, 2, 0, 0, 12 }, /* Y */
2347  { 1, 2, 0, 0, 12 }, /* U */
2348  { 2, 2, 0, 0, 12 }, /* V */
2349  { 3, 2, 0, 0, 12 }, /* A */
2350  },
2352  },
2354  .name = "yuva422p12le",
2355  .nb_components = 4,
2356  .log2_chroma_w = 1,
2357  .log2_chroma_h = 0,
2358  .comp = {
2359  { 0, 2, 0, 0, 12 }, /* Y */
2360  { 1, 2, 0, 0, 12 }, /* U */
2361  { 2, 2, 0, 0, 12 }, /* V */
2362  { 3, 2, 0, 0, 12 }, /* A */
2363  },
2365  },
2367  .name = "yuva444p12be",
2368  .nb_components = 4,
2369  .log2_chroma_w = 0,
2370  .log2_chroma_h = 0,
2371  .comp = {
2372  { 0, 2, 0, 0, 12 }, /* Y */
2373  { 1, 2, 0, 0, 12 }, /* U */
2374  { 2, 2, 0, 0, 12 }, /* V */
2375  { 3, 2, 0, 0, 12 }, /* A */
2376  },
2378  },
2380  .name = "yuva444p12le",
2381  .nb_components = 4,
2382  .log2_chroma_w = 0,
2383  .log2_chroma_h = 0,
2384  .comp = {
2385  { 0, 2, 0, 0, 12 }, /* Y */
2386  { 1, 2, 0, 0, 12 }, /* U */
2387  { 2, 2, 0, 0, 12 }, /* V */
2388  { 3, 2, 0, 0, 12 }, /* A */
2389  },
2391  },
2392  [AV_PIX_FMT_NV24] = {
2393  .name = "nv24",
2394  .nb_components = 3,
2395  .log2_chroma_w = 0,
2396  .log2_chroma_h = 0,
2397  .comp = {
2398  { 0, 1, 0, 0, 8 }, /* Y */
2399  { 1, 2, 0, 0, 8 }, /* U */
2400  { 1, 2, 1, 0, 8 }, /* V */
2401  },
2402  .flags = AV_PIX_FMT_FLAG_PLANAR,
2403  },
2404  [AV_PIX_FMT_NV42] = {
2405  .name = "nv42",
2406  .nb_components = 3,
2407  .log2_chroma_w = 0,
2408  .log2_chroma_h = 0,
2409  .comp = {
2410  { 0, 1, 0, 0, 8 }, /* Y */
2411  { 1, 2, 1, 0, 8 }, /* U */
2412  { 1, 2, 0, 0, 8 }, /* V */
2413  },
2414  .flags = AV_PIX_FMT_FLAG_PLANAR,
2415  },
2416  [AV_PIX_FMT_VULKAN] = {
2417  .name = "vulkan",
2418  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2419  },
2420  [AV_PIX_FMT_P210BE] = {
2421  .name = "p210be",
2422  .nb_components = 3,
2423  .log2_chroma_w = 1,
2424  .log2_chroma_h = 0,
2425  .comp = {
2426  { 0, 2, 0, 6, 10 }, /* Y */
2427  { 1, 4, 0, 6, 10 }, /* U */
2428  { 1, 4, 2, 6, 10 }, /* V */
2429  },
2431  },
2432  [AV_PIX_FMT_P210LE] = {
2433  .name = "p210le",
2434  .nb_components = 3,
2435  .log2_chroma_w = 1,
2436  .log2_chroma_h = 0,
2437  .comp = {
2438  { 0, 2, 0, 6, 10 }, /* Y */
2439  { 1, 4, 0, 6, 10 }, /* U */
2440  { 1, 4, 2, 6, 10 }, /* V */
2441  },
2442  .flags = AV_PIX_FMT_FLAG_PLANAR,
2443  },
2444  [AV_PIX_FMT_P410BE] = {
2445  .name = "p410be",
2446  .nb_components = 3,
2447  .log2_chroma_w = 0,
2448  .log2_chroma_h = 0,
2449  .comp = {
2450  { 0, 2, 0, 6, 10 }, /* Y */
2451  { 1, 4, 0, 6, 10 }, /* U */
2452  { 1, 4, 2, 6, 10 }, /* V */
2453  },
2455  },
2456  [AV_PIX_FMT_P410LE] = {
2457  .name = "p410le",
2458  .nb_components = 3,
2459  .log2_chroma_w = 0,
2460  .log2_chroma_h = 0,
2461  .comp = {
2462  { 0, 2, 0, 6, 10 }, /* Y */
2463  { 1, 4, 0, 6, 10 }, /* U */
2464  { 1, 4, 2, 6, 10 }, /* V */
2465  },
2466  .flags = AV_PIX_FMT_FLAG_PLANAR,
2467  },
2468  [AV_PIX_FMT_P216BE] = {
2469  .name = "p216be",
2470  .nb_components = 3,
2471  .log2_chroma_w = 1,
2472  .log2_chroma_h = 0,
2473  .comp = {
2474  { 0, 2, 0, 0, 16 }, /* Y */
2475  { 1, 4, 0, 0, 16 }, /* U */
2476  { 1, 4, 2, 0, 16 }, /* V */
2477  },
2479  },
2480  [AV_PIX_FMT_P216LE] = {
2481  .name = "p216le",
2482  .nb_components = 3,
2483  .log2_chroma_w = 1,
2484  .log2_chroma_h = 0,
2485  .comp = {
2486  { 0, 2, 0, 0, 16 }, /* Y */
2487  { 1, 4, 0, 0, 16 }, /* U */
2488  { 1, 4, 2, 0, 16 }, /* V */
2489  },
2490  .flags = AV_PIX_FMT_FLAG_PLANAR,
2491  },
2492  [AV_PIX_FMT_P416BE] = {
2493  .name = "p416be",
2494  .nb_components = 3,
2495  .log2_chroma_w = 0,
2496  .log2_chroma_h = 0,
2497  .comp = {
2498  { 0, 2, 0, 0, 16 }, /* Y */
2499  { 1, 4, 0, 0, 16 }, /* U */
2500  { 1, 4, 2, 0, 16 }, /* V */
2501  },
2503  },
2504  [AV_PIX_FMT_P416LE] = {
2505  .name = "p416le",
2506  .nb_components = 3,
2507  .log2_chroma_w = 0,
2508  .log2_chroma_h = 0,
2509  .comp = {
2510  { 0, 2, 0, 0, 16 }, /* Y */
2511  { 1, 4, 0, 0, 16 }, /* U */
2512  { 1, 4, 2, 0, 16 }, /* V */
2513  },
2514  .flags = AV_PIX_FMT_FLAG_PLANAR,
2515  },
2516  [AV_PIX_FMT_VUYA] = {
2517  .name = "vuya",
2518  .nb_components = 4,
2519  .log2_chroma_w = 0,
2520  .log2_chroma_h = 0,
2521  .comp = {
2522  { 0, 4, 2, 0, 8 }, /* Y */
2523  { 0, 4, 1, 0, 8 }, /* U */
2524  { 0, 4, 0, 0, 8 }, /* V */
2525  { 0, 4, 3, 0, 8 }, /* A */
2526  },
2527  .flags = AV_PIX_FMT_FLAG_ALPHA,
2528  },
2529  [AV_PIX_FMT_VUYX] = {
2530  .name = "vuyx",
2531  .nb_components = 3,
2532  .log2_chroma_w = 0,
2533  .log2_chroma_h = 0,
2534  .comp = {
2535  { 0, 4, 2, 0, 8 }, /* Y */
2536  { 0, 4, 1, 0, 8 }, /* U */
2537  { 0, 4, 0, 0, 8 }, /* V */
2538  },
2539  },
2540  [AV_PIX_FMT_RGBAF16BE] = {
2541  .name = "rgbaf16be",
2542  .nb_components = 4,
2543  .log2_chroma_w = 0,
2544  .log2_chroma_h = 0,
2545  .comp = {
2546  { 0, 8, 0, 0, 16 }, /* R */
2547  { 0, 8, 2, 0, 16 }, /* G */
2548  { 0, 8, 4, 0, 16 }, /* B */
2549  { 0, 8, 6, 0, 16 }, /* A */
2550  },
2553  },
2554  [AV_PIX_FMT_RGBAF16LE] = {
2555  .name = "rgbaf16le",
2556  .nb_components = 4,
2557  .log2_chroma_w = 0,
2558  .log2_chroma_h = 0,
2559  .comp = {
2560  { 0, 8, 0, 0, 16 }, /* R */
2561  { 0, 8, 2, 0, 16 }, /* G */
2562  { 0, 8, 4, 0, 16 }, /* B */
2563  { 0, 8, 6, 0, 16 }, /* A */
2564  },
2567  },
2568  [AV_PIX_FMT_Y212LE] = {
2569  .name = "y212le",
2570  .nb_components = 3,
2571  .log2_chroma_w = 1,
2572  .log2_chroma_h = 0,
2573  .comp = {
2574  { 0, 4, 0, 4, 12 }, /* Y */
2575  { 0, 8, 2, 4, 12 }, /* U */
2576  { 0, 8, 6, 4, 12 }, /* V */
2577  },
2578  },
2579  [AV_PIX_FMT_Y212BE] = {
2580  .name = "y212be",
2581  .nb_components = 3,
2582  .log2_chroma_w = 1,
2583  .log2_chroma_h = 0,
2584  .comp = {
2585  { 0, 4, 0, 4, 12 }, /* Y */
2586  { 0, 8, 2, 4, 12 }, /* U */
2587  { 0, 8, 6, 4, 12 }, /* V */
2588  },
2589  .flags = AV_PIX_FMT_FLAG_BE,
2590  },
2591  [AV_PIX_FMT_XV30LE] = {
2592  .name = "xv30le",
2593  .nb_components= 3,
2594  .log2_chroma_w= 0,
2595  .log2_chroma_h= 0,
2596  .comp = {
2597  { 0, 4, 1, 2, 10 }, /* Y */
2598  { 0, 4, 0, 0, 10 }, /* U */
2599  { 0, 4, 2, 4, 10 }, /* V */
2600  },
2601  },
2602  [AV_PIX_FMT_XV30BE] = {
2603  .name = "xv30be",
2604  .nb_components= 3,
2605  .log2_chroma_w= 0,
2606  .log2_chroma_h= 0,
2607  .comp = {
2608  { 0, 32, 10, 0, 10 }, /* Y */
2609  { 0, 32, 0, 0, 10 }, /* U */
2610  { 0, 32, 20, 0, 10 }, /* V */
2611  },
2613  },
2614  [AV_PIX_FMT_XV36LE] = {
2615  .name = "xv36le",
2616  .nb_components= 3,
2617  .log2_chroma_w= 0,
2618  .log2_chroma_h= 0,
2619  .comp = {
2620  { 0, 8, 2, 4, 12 }, /* Y */
2621  { 0, 8, 0, 4, 12 }, /* U */
2622  { 0, 8, 4, 4, 12 }, /* V */
2623  },
2624  },
2625  [AV_PIX_FMT_XV36BE] = {
2626  .name = "xv36be",
2627  .nb_components= 3,
2628  .log2_chroma_w= 0,
2629  .log2_chroma_h= 0,
2630  .comp = {
2631  { 0, 8, 2, 4, 12 }, /* Y */
2632  { 0, 8, 0, 4, 12 }, /* U */
2633  { 0, 8, 4, 4, 12 }, /* V */
2634  },
2635  .flags = AV_PIX_FMT_FLAG_BE,
2636  },
2637  [AV_PIX_FMT_RGBF32BE] = {
2638  .name = "rgbf32be",
2639  .nb_components = 3,
2640  .log2_chroma_w = 0,
2641  .log2_chroma_h = 0,
2642  .comp = {
2643  { 0, 12, 0, 0, 32 }, /* R */
2644  { 0, 12, 4, 0, 32 }, /* G */
2645  { 0, 12, 8, 0, 32 }, /* B */
2646  },
2649  },
2650  [AV_PIX_FMT_RGBF32LE] = {
2651  .name = "rgbf32le",
2652  .nb_components = 3,
2653  .log2_chroma_w = 0,
2654  .log2_chroma_h = 0,
2655  .comp = {
2656  { 0, 12, 0, 0, 32 }, /* R */
2657  { 0, 12, 4, 0, 32 }, /* G */
2658  { 0, 12, 8, 0, 32 }, /* B */
2659  },
2661  },
2662  [AV_PIX_FMT_RGBAF32BE] = {
2663  .name = "rgbaf32be",
2664  .nb_components = 4,
2665  .log2_chroma_w = 0,
2666  .log2_chroma_h = 0,
2667  .comp = {
2668  { 0, 16, 0, 0, 32 }, /* R */
2669  { 0, 16, 4, 0, 32 }, /* G */
2670  { 0, 16, 8, 0, 32 }, /* B */
2671  { 0, 16, 12, 0, 32 }, /* A */
2672  },
2675  },
2676  [AV_PIX_FMT_RGBAF32LE] = {
2677  .name = "rgbaf32le",
2678  .nb_components = 4,
2679  .log2_chroma_w = 0,
2680  .log2_chroma_h = 0,
2681  .comp = {
2682  { 0, 16, 0, 0, 32 }, /* R */
2683  { 0, 16, 4, 0, 32 }, /* G */
2684  { 0, 16, 8, 0, 32 }, /* B */
2685  { 0, 16, 12, 0, 32 }, /* A */
2686  },
2689  },
2690 };
2691 
2692 static const char * const color_range_names[] = {
2693  [AVCOL_RANGE_UNSPECIFIED] = "unknown",
2694  [AVCOL_RANGE_MPEG] = "tv",
2695  [AVCOL_RANGE_JPEG] = "pc",
2696 };
2697 
2698 static const char * const color_primaries_names[AVCOL_PRI_NB] = {
2699  [AVCOL_PRI_RESERVED0] = "reserved",
2700  [AVCOL_PRI_BT709] = "bt709",
2701  [AVCOL_PRI_UNSPECIFIED] = "unknown",
2702  [AVCOL_PRI_RESERVED] = "reserved",
2703  [AVCOL_PRI_BT470M] = "bt470m",
2704  [AVCOL_PRI_BT470BG] = "bt470bg",
2705  [AVCOL_PRI_SMPTE170M] = "smpte170m",
2706  [AVCOL_PRI_SMPTE240M] = "smpte240m",
2707  [AVCOL_PRI_FILM] = "film",
2708  [AVCOL_PRI_BT2020] = "bt2020",
2709  [AVCOL_PRI_SMPTE428] = "smpte428",
2710  [AVCOL_PRI_SMPTE431] = "smpte431",
2711  [AVCOL_PRI_SMPTE432] = "smpte432",
2712  [AVCOL_PRI_EBU3213] = "ebu3213",
2713 };
2714 
2715 static const char * const color_transfer_names[] = {
2716  [AVCOL_TRC_RESERVED0] = "reserved",
2717  [AVCOL_TRC_BT709] = "bt709",
2718  [AVCOL_TRC_UNSPECIFIED] = "unknown",
2719  [AVCOL_TRC_RESERVED] = "reserved",
2720  [AVCOL_TRC_GAMMA22] = "bt470m",
2721  [AVCOL_TRC_GAMMA28] = "bt470bg",
2722  [AVCOL_TRC_SMPTE170M] = "smpte170m",
2723  [AVCOL_TRC_SMPTE240M] = "smpte240m",
2724  [AVCOL_TRC_LINEAR] = "linear",
2725  [AVCOL_TRC_LOG] = "log100",
2726  [AVCOL_TRC_LOG_SQRT] = "log316",
2727  [AVCOL_TRC_IEC61966_2_4] = "iec61966-2-4",
2728  [AVCOL_TRC_BT1361_ECG] = "bt1361e",
2729  [AVCOL_TRC_IEC61966_2_1] = "iec61966-2-1",
2730  [AVCOL_TRC_BT2020_10] = "bt2020-10",
2731  [AVCOL_TRC_BT2020_12] = "bt2020-12",
2732  [AVCOL_TRC_SMPTE2084] = "smpte2084",
2733  [AVCOL_TRC_SMPTE428] = "smpte428",
2734  [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67",
2735 };
2736 
2737 static const char * const color_space_names[] = {
2738  [AVCOL_SPC_RGB] = "gbr",
2739  [AVCOL_SPC_BT709] = "bt709",
2740  [AVCOL_SPC_UNSPECIFIED] = "unknown",
2741  [AVCOL_SPC_RESERVED] = "reserved",
2742  [AVCOL_SPC_FCC] = "fcc",
2743  [AVCOL_SPC_BT470BG] = "bt470bg",
2744  [AVCOL_SPC_SMPTE170M] = "smpte170m",
2745  [AVCOL_SPC_SMPTE240M] = "smpte240m",
2746  [AVCOL_SPC_YCGCO] = "ycgco",
2747  [AVCOL_SPC_BT2020_NCL] = "bt2020nc",
2748  [AVCOL_SPC_BT2020_CL] = "bt2020c",
2749  [AVCOL_SPC_SMPTE2085] = "smpte2085",
2750  [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
2751  [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
2752  [AVCOL_SPC_ICTCP] = "ictcp",
2753 };
2754 
2755 static const char * const chroma_location_names[] = {
2756  [AVCHROMA_LOC_UNSPECIFIED] = "unspecified",
2757  [AVCHROMA_LOC_LEFT] = "left",
2758  [AVCHROMA_LOC_CENTER] = "center",
2759  [AVCHROMA_LOC_TOPLEFT] = "topleft",
2760  [AVCHROMA_LOC_TOP] = "top",
2761  [AVCHROMA_LOC_BOTTOMLEFT] = "bottomleft",
2762  [AVCHROMA_LOC_BOTTOM] = "bottom",
2763 };
2764 
2765 static enum AVPixelFormat get_pix_fmt_internal(const char *name)
2766 {
2767  enum AVPixelFormat pix_fmt;
2768 
2769  for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
2771  (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
2773  return pix_fmt;
2774 
2775  return AV_PIX_FMT_NONE;
2776 }
2777 
2779 {
2780  return (unsigned)pix_fmt < AV_PIX_FMT_NB ?
2782 }
2783 
2784 #if HAVE_BIGENDIAN
2785 # define X_NE(be, le) be
2786 #else
2787 # define X_NE(be, le) le
2788 #endif
2789 
2791 {
2792  enum AVPixelFormat pix_fmt;
2793 
2794  if (!strcmp(name, "rgb32"))
2795  name = X_NE("argb", "bgra");
2796  else if (!strcmp(name, "bgr32"))
2797  name = X_NE("abgr", "rgba");
2798 
2800  if (pix_fmt == AV_PIX_FMT_NONE) {
2801  char name2[32];
2802 
2803  snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le"));
2804  pix_fmt = get_pix_fmt_internal(name2);
2805  }
2806 
2807  return pix_fmt;
2808 }
2809 
2811 {
2812  int c, bits = 0;
2813  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2814 
2815  for (c = 0; c < pixdesc->nb_components; c++) {
2816  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2817  bits += pixdesc->comp[c].depth << s;
2818  }
2819 
2820  return bits >> log2_pixels;
2821 }
2822 
2824 {
2825  int c, bits = 0;
2826  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2827  int steps[4] = {0};
2828 
2829  for (c = 0; c < pixdesc->nb_components; c++) {
2830  const AVComponentDescriptor *comp = &pixdesc->comp[c];
2831  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2832  steps[comp->plane] = comp->step << s;
2833  }
2834  for (c = 0; c < 4; c++)
2835  bits += steps[c];
2836 
2837  if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM))
2838  bits *= 8;
2839 
2840  return bits >> log2_pixels;
2841 }
2842 
2843 char *av_get_pix_fmt_string(char *buf, int buf_size,
2844  enum AVPixelFormat pix_fmt)
2845 {
2846  /* print header */
2847  if (pix_fmt < 0) {
2848  snprintf (buf, buf_size, "name" " nb_components" " nb_bits");
2849  } else {
2851  snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name,
2852  pixdesc->nb_components, av_get_bits_per_pixel(pixdesc));
2853  }
2854 
2855  return buf;
2856 }
2857 
2859 {
2860  if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
2861  return NULL;
2863 }
2864 
2866 {
2867  if (!prev)
2868  return &av_pix_fmt_descriptors[0];
2870  prev++;
2871  if (prev->name)
2872  return prev;
2873  }
2874  return NULL;
2875 }
2876 
2878 {
2879  if (desc < av_pix_fmt_descriptors ||
2881  return AV_PIX_FMT_NONE;
2882 
2883  return desc - av_pix_fmt_descriptors;
2884 }
2885 
2887  int *h_shift, int *v_shift)
2888 {
2890  if (!desc)
2891  return AVERROR(ENOSYS);
2892  *h_shift = desc->log2_chroma_w;
2893  *v_shift = desc->log2_chroma_h;
2894 
2895  return 0;
2896 }
2897 
2899 {
2901  int i, planes[4] = { 0 }, ret = 0;
2902 
2903  if (!desc)
2904  return AVERROR(EINVAL);
2905 
2906  for (i = 0; i < desc->nb_components; i++)
2907  planes[desc->comp[i].plane] = 1;
2908  for (i = 0; i < FF_ARRAY_ELEMS(planes); i++)
2909  ret += planes[i];
2910  return ret;
2911 }
2912 
2914 {
2916  char name[16];
2917  int i;
2918 
2919  if (!desc || strlen(desc->name) < 2)
2920  return AV_PIX_FMT_NONE;
2921  av_strlcpy(name, desc->name, sizeof(name));
2922  i = strlen(name) - 2;
2923  if (strcmp(name + i, "be") && strcmp(name + i, "le"))
2924  return AV_PIX_FMT_NONE;
2925 
2926  name[i] ^= 'b' ^ 'l';
2927 
2928  return get_pix_fmt_internal(name);
2929 }
2930 
2931 #define FF_COLOR_NA -1
2932 #define FF_COLOR_RGB 0 /**< RGB color space */
2933 #define FF_COLOR_GRAY 1 /**< gray color space */
2934 #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
2935 #define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
2936 #define FF_COLOR_XYZ 4
2937 
2938 #define pixdesc_has_alpha(pixdesc) \
2939  ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
2940 
2941 
2943  if (desc->flags & AV_PIX_FMT_FLAG_PAL)
2944  return FF_COLOR_RGB;
2945 
2946  if(desc->nb_components == 1 || desc->nb_components == 2)
2947  return FF_COLOR_GRAY;
2948 
2949  if (desc->name) {
2950  if (av_strstart(desc->name, "yuvj", NULL))
2951  return FF_COLOR_YUV_JPEG;
2952 
2953  if (av_strstart(desc->name, "xyz", NULL))
2954  return FF_COLOR_XYZ;
2955  }
2956 
2957  if(desc->flags & AV_PIX_FMT_FLAG_RGB)
2958  return FF_COLOR_RGB;
2959 
2960  if(desc->nb_components == 0)
2961  return FF_COLOR_NA;
2962 
2963  return FF_COLOR_YUV;
2964 }
2965 
2966 static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
2967 {
2969  int i;
2970 
2971  if (!desc || !desc->nb_components) {
2972  *min = *max = 0;
2973  return AVERROR(EINVAL);
2974  }
2975 
2976  *min = INT_MAX, *max = -INT_MAX;
2977  for (i = 0; i < desc->nb_components; i++) {
2978  *min = FFMIN(desc->comp[i].depth, *min);
2979  *max = FFMAX(desc->comp[i].depth, *max);
2980  }
2981  return 0;
2982 }
2983 
2984 static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
2985  enum AVPixelFormat src_pix_fmt,
2986  unsigned *lossp, unsigned consider)
2987 {
2988  const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
2989  const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
2990  int src_color, dst_color;
2991  int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
2992  int ret, loss, i, nb_components;
2993  int score = INT_MAX - 1;
2994 
2995  if (!src_desc || !dst_desc)
2996  return -4;
2997 
2998  if ((src_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) ||
2999  (dst_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
3000  if (dst_pix_fmt == src_pix_fmt)
3001  return -1;
3002  else
3003  return -2;
3004  }
3005 
3006  /* compute loss */
3007  *lossp = loss = 0;
3008 
3009  if (dst_pix_fmt == src_pix_fmt)
3010  return INT_MAX;
3011 
3012  if ((ret = get_pix_fmt_depth(&src_min_depth, &src_max_depth, src_pix_fmt)) < 0)
3013  return -3;
3014  if ((ret = get_pix_fmt_depth(&dst_min_depth, &dst_max_depth, dst_pix_fmt)) < 0)
3015  return -3;
3016 
3017  src_color = get_color_type(src_desc);
3018  dst_color = get_color_type(dst_desc);
3019  if (dst_pix_fmt == AV_PIX_FMT_PAL8)
3020  nb_components = FFMIN(src_desc->nb_components, 4);
3021  else
3022  nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components);
3023 
3024  for (i = 0; i < nb_components; i++) {
3025  int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1);
3026  int depth_delta = src_desc->comp[i].depth - 1 - depth_minus1;
3027  if (depth_delta > 0 && (consider & FF_LOSS_DEPTH)) {
3028  loss |= FF_LOSS_DEPTH;
3029  score -= 65536 >> depth_minus1;
3030  } else if (depth_delta < 0 && (consider & FF_LOSS_EXCESS_DEPTH)) {
3031  // Favour formats where bit depth exactly matches. If all other
3032  // scoring is equal, we'd rather use the bit depth that most closely
3033  // matches the source.
3034  loss |= FF_LOSS_EXCESS_DEPTH;
3035  score += depth_delta;
3036  }
3037  }
3038 
3039  if (consider & FF_LOSS_RESOLUTION) {
3040  if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w) {
3041  loss |= FF_LOSS_RESOLUTION;
3042  score -= 256 << dst_desc->log2_chroma_w;
3043  }
3044  if (dst_desc->log2_chroma_h > src_desc->log2_chroma_h) {
3045  loss |= FF_LOSS_RESOLUTION;
3046  score -= 256 << dst_desc->log2_chroma_h;
3047  }
3048  // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side
3049  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 &&
3050  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) {
3051  score += 512;
3052  }
3053  }
3054 
3055  if (consider & FF_LOSS_EXCESS_RESOLUTION) {
3056  // Favour formats where chroma subsampling exactly matches. If all other
3057  // scoring is equal, we'd rather use the subsampling that most closely
3058  // matches the source.
3059  if (dst_desc->log2_chroma_w < src_desc->log2_chroma_w) {
3060  loss |= FF_LOSS_EXCESS_RESOLUTION;
3061  score -= 1 << (src_desc->log2_chroma_w - dst_desc->log2_chroma_w);
3062  }
3063 
3064  if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) {
3065  loss |= FF_LOSS_EXCESS_RESOLUTION;
3066  score -= 1 << (src_desc->log2_chroma_h - dst_desc->log2_chroma_h);
3067  }
3068 
3069  // don't favour 411 over 420, because 420 has much better support on the
3070  // decoder side.
3071  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 2 &&
3072  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 2) {
3073  score += 4;
3074  }
3075  }
3076 
3077  if(consider & FF_LOSS_COLORSPACE)
3078  switch(dst_color) {
3079  case FF_COLOR_RGB:
3080  if (src_color != FF_COLOR_RGB &&
3081  src_color != FF_COLOR_GRAY)
3082  loss |= FF_LOSS_COLORSPACE;
3083  break;
3084  case FF_COLOR_GRAY:
3085  if (src_color != FF_COLOR_GRAY)
3086  loss |= FF_LOSS_COLORSPACE;
3087  break;
3088  case FF_COLOR_YUV:
3089  if (src_color != FF_COLOR_YUV)
3090  loss |= FF_LOSS_COLORSPACE;
3091  break;
3092  case FF_COLOR_YUV_JPEG:
3093  if (src_color != FF_COLOR_YUV_JPEG &&
3094  src_color != FF_COLOR_YUV &&
3095  src_color != FF_COLOR_GRAY)
3096  loss |= FF_LOSS_COLORSPACE;
3097  break;
3098  default:
3099  /* fail safe test */
3100  if (src_color != dst_color)
3101  loss |= FF_LOSS_COLORSPACE;
3102  break;
3103  }
3104  if(loss & FF_LOSS_COLORSPACE)
3105  score -= (nb_components * 65536) >> FFMIN(dst_desc->comp[0].depth - 1, src_desc->comp[0].depth - 1);
3106 
3107  if (dst_color == FF_COLOR_GRAY &&
3108  src_color != FF_COLOR_GRAY && (consider & FF_LOSS_CHROMA)) {
3109  loss |= FF_LOSS_CHROMA;
3110  score -= 2 * 65536;
3111  }
3112  if (!pixdesc_has_alpha(dst_desc) && (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))) {
3113  loss |= FF_LOSS_ALPHA;
3114  score -= 65536;
3115  }
3116  if (dst_pix_fmt == AV_PIX_FMT_PAL8 && (consider & FF_LOSS_COLORQUANT) &&
3117  (src_pix_fmt != AV_PIX_FMT_PAL8 && (src_color != FF_COLOR_GRAY || (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))))) {
3118  loss |= FF_LOSS_COLORQUANT;
3119  score -= 65536;
3120  }
3121 
3122  *lossp = loss;
3123  return score;
3124 }
3125 
3126 int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
3127  enum AVPixelFormat src_pix_fmt,
3128  int has_alpha)
3129 {
3130  int loss;
3131  int ret = get_pix_fmt_score(dst_pix_fmt, src_pix_fmt, &loss, has_alpha ? ~0 : ~FF_LOSS_ALPHA);
3132  if (ret < 0)
3133  return ret;
3134  return loss;
3135 }
3136 
3137 enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
3138  enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
3139 {
3140  enum AVPixelFormat dst_pix_fmt;
3141  int loss1, loss2, loss_mask;
3142  const AVPixFmtDescriptor *desc1 = av_pix_fmt_desc_get(dst_pix_fmt1);
3143  const AVPixFmtDescriptor *desc2 = av_pix_fmt_desc_get(dst_pix_fmt2);
3144  int score1, score2;
3145 
3146  if (!desc1) {
3147  dst_pix_fmt = dst_pix_fmt2;
3148  } else if (!desc2) {
3149  dst_pix_fmt = dst_pix_fmt1;
3150  } else {
3151  loss_mask= loss_ptr?~*loss_ptr:~0; /* use loss mask if provided */
3152  if(!has_alpha)
3153  loss_mask &= ~FF_LOSS_ALPHA;
3154 
3155  score1 = get_pix_fmt_score(dst_pix_fmt1, src_pix_fmt, &loss1, loss_mask);
3156  score2 = get_pix_fmt_score(dst_pix_fmt2, src_pix_fmt, &loss2, loss_mask);
3157 
3158  if (score1 == score2) {
3160  dst_pix_fmt = av_get_padded_bits_per_pixel(desc2) < av_get_padded_bits_per_pixel(desc1) ? dst_pix_fmt2 : dst_pix_fmt1;
3161  } else {
3162  dst_pix_fmt = desc2->nb_components < desc1->nb_components ? dst_pix_fmt2 : dst_pix_fmt1;
3163  }
3164  } else {
3165  dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
3166  }
3167  }
3168 
3169  if (loss_ptr)
3170  *loss_ptr = av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha);
3171  return dst_pix_fmt;
3172 }
3173 
3174 const char *av_color_range_name(enum AVColorRange range)
3175 {
3176  return (unsigned) range < AVCOL_RANGE_NB ?
3177  color_range_names[range] : NULL;
3178 }
3179 
3181 {
3182  int i;
3183 
3184  for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) {
3186  return i;
3187  }
3188 
3189  return AVERROR(EINVAL);
3190 }
3191 
3192 const char *av_color_primaries_name(enum AVColorPrimaries primaries)
3193 {
3194  return (unsigned) primaries < AVCOL_PRI_NB ?
3195  color_primaries_names[primaries] : NULL;
3196 }
3197 
3199 {
3200  int i;
3201 
3202  for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) {
3203  if (!color_primaries_names[i])
3204  continue;
3205 
3207  return i;
3208  }
3209 
3210  return AVERROR(EINVAL);
3211 }
3212 
3214 {
3215  return (unsigned) transfer < AVCOL_TRC_NB ?
3216  color_transfer_names[transfer] : NULL;
3217 }
3218 
3220 {
3221  int i;
3222 
3223  for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) {
3224  if (!color_transfer_names[i])
3225  continue;
3226 
3228  return i;
3229  }
3230 
3231  return AVERROR(EINVAL);
3232 }
3233 
3235 {
3236  return (unsigned) space < AVCOL_SPC_NB ?
3238 }
3239 
3241 {
3242  int i;
3243 
3244  for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) {
3245  if (!color_space_names[i])
3246  continue;
3247 
3249  return i;
3250  }
3251 
3252  return AVERROR(EINVAL);
3253 }
3254 
3255 const char *av_chroma_location_name(enum AVChromaLocation location)
3256 {
3257  return (unsigned) location < AVCHROMA_LOC_NB ?
3258  chroma_location_names[location] : NULL;
3259 }
3260 
3262 {
3263  int i;
3264 
3265  for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) {
3266  if (!chroma_location_names[i])
3267  continue;
3268 
3270  return i;
3271  }
3272 
3273  return AVERROR(EINVAL);
3274 }
3275 
3276 int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
3277 {
3278  if (pos <= AVCHROMA_LOC_UNSPECIFIED || pos >= AVCHROMA_LOC_NB)
3279  return AVERROR(EINVAL);
3280  pos--;
3281 
3282  *xpos = (pos&1) * 128;
3283  *ypos = ((pos>>1)^(pos<4)) * 128;
3284 
3285  return 0;
3286 }
3287 
3289 {
3290  int pos, xout, yout;
3291 
3292  for (pos = AVCHROMA_LOC_UNSPECIFIED + 1; pos < AVCHROMA_LOC_NB; pos++) {
3293  if (av_chroma_location_enum_to_pos(&xout, &yout, pos) == 0 && xout == xpos && yout == ypos)
3294  return pos;
3295  }
3296  return AVCHROMA_LOC_UNSPECIFIED;
3297 }
AVCOL_PRI_RESERVED
@ AVCOL_PRI_RESERVED
Definition: pixfmt.h:537
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:189
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:2913
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:147
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:412
AV_PIX_FMT_CUDA
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
Definition: pixfmt.h:253
AV_PIX_FMT_GRAY10BE
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
Definition: pixfmt.h:317
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
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:286
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:139
AVCOL_PRI_EBU3213
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
Definition: pixfmt.h:549
AV_PIX_FMT_P416BE
@ AV_PIX_FMT_P416BE
interleaved chroma YUV 4:4:4, 48bpp, big-endian
Definition: pixfmt.h:395
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:133
FF_LOSS_CHROMA
#define FF_LOSS_CHROMA
loss of chroma (e.g.
Definition: pixdesc.h:387
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:197
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:426
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:558
comp
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
Definition: eamad.c:80
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:129
AV_PIX_FMT_GBRP16BE
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
Definition: pixfmt.h:164
AV_PIX_FMT_GBRP10BE
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
Definition: pixfmt.h:162
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:2858
AVCOL_TRC_LINEAR
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
Definition: pixfmt.h:567
AVCHROMA_LOC_BOTTOM
@ AVCHROMA_LOC_BOTTOM
Definition: pixfmt.h:687
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:267
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:245
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:159
av_pix_fmt_descriptors
static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
Definition: pixdesc.c:167
av_color_space_from_name
int av_color_space_from_name(const char *name)
Definition: pixdesc.c:3240
AVCOL_TRC_NB
@ AVCOL_TRC_NB
Not part of ABI.
Definition: pixfmt.h:580
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:178
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:195
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:298
AV_PIX_FMT_GBRAPF32LE
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
Definition: pixfmt.h:341
av_color_range_from_name
int av_color_range_from_name(const char *name)
Definition: pixdesc.c:3180
w
uint8_t w
Definition: llviddspenc.c:38
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
Full range content.
Definition: pixfmt.h:661
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:384
AV_PIX_FMT_GBRPF32BE
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
Definition: pixfmt.h:338
AV_PIX_FMT_DRM_PRIME
@ AV_PIX_FMT_DRM_PRIME
DRM-managed buffers exposed through PRIME buffer sharing.
Definition: pixfmt.h:348
AVComponentDescriptor::depth
int depth
Number of bits in the component.
Definition: pixdesc.h:57
AVPixFmtDescriptor::name
const char * name
Definition: pixdesc.h:70
AVCOL_SPC_NB
@ AVCOL_SPC_NB
Not part of ABI.
Definition: pixfmt.h:604
AVCOL_TRC_UNSPECIFIED
@ AVCOL_TRC_UNSPECIFIED
Definition: pixfmt.h:561
data
const char data[16]
Definition: mxf.c:146
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:305
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:75
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:2865
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:262
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:121
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:247
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:588
AVCOL_TRC_BT2020_12
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
Definition: pixfmt.h:574
AV_PIX_FMT_GBRP14BE
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
Definition: pixfmt.h:274
AV_PIX_FMT_BGR24
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:69
AV_PIX_FMT_BGRA
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:95
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:2810
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:99
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:2843
AVColorPrimaries
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:533
FF_COLOR_GRAY
#define FF_COLOR_GRAY
gray color space
Definition: pixdesc.c:2933
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:156
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:172
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:289
AV_PIX_FMT_GRAY10LE
@ AV_PIX_FMT_GRAY10LE
Y , 10bpp, little-endian.
Definition: pixfmt.h:318
AV_PIX_FMT_GRAYF32LE
@ AV_PIX_FMT_GRAYF32LE
IEEE-754 single precision Y, 32bpp, little-endian.
Definition: pixfmt.h:361
AVCOL_SPC_BT2020_CL
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
Definition: pixfmt.h:599
av_chroma_location_name
const char * av_chroma_location_name(enum AVChromaLocation location)
Definition: pixdesc.c:3255
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:376
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:107
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:401
FF_LOSS_EXCESS_RESOLUTION
#define FF_LOSS_EXCESS_RESOLUTION
loss due to unneeded extra resolution
Definition: pixdesc.h:388
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:299
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:125
FF_LOSS_ALPHA
#define FF_LOSS_ALPHA
loss of alpha bits
Definition: pixdesc.h:385
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:287
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:300
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:423
FF_LOSS_EXCESS_DEPTH
#define FF_LOSS_EXCESS_DEPTH
loss due to unneeded extra color depth
Definition: pixdesc.h:389
AV_PIX_FMT_GBRAP12LE
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
Definition: pixfmt.h:308
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:97
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2898
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:593
av_chroma_location_from_name
int av_chroma_location_from_name(const char *name)
Definition: pixdesc.c:3261
AVCOL_SPC_RESERVED
@ AVCOL_SPC_RESERVED
reserved for future use by ITU-T and ISO/IEC just like 15-255 are
Definition: pixfmt.h:591
AVCOL_TRC_IEC61966_2_1
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
Definition: pixfmt.h:572
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:408
av_color_space_name
const char * av_color_space_name(enum AVColorSpace space)
Definition: pixdesc.c:3234
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:205
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:261
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:336
AVCOL_RANGE_NB
@ AVCOL_RANGE_NB
Not part of ABI.
Definition: pixfmt.h:662
AVCOL_TRC_GAMMA28
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
Definition: pixfmt.h:564
av_color_transfer_from_name
int av_color_transfer_from_name(const char *name)
Definition: pixdesc.c:3219
val
static double val(void *priv, double ch)
Definition: aeval.c:77
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:2886
chroma_location_names
static const char *const chroma_location_names[]
Definition: pixdesc.c:2755
AVCOL_TRC_LOG_SQRT
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
Definition: pixfmt.h:569
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:184
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:154
AVCOL_TRC_GAMMA22
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
Definition: pixfmt.h:563
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:149
AV_PIX_FMT_VUYA
@ AV_PIX_FMT_VUYA
packed VUYA 4:4:4, 32bpp, VUYAVUYA...
Definition: pixfmt.h:398
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:269
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:276
AV_PIX_FMT_YUV422P12BE
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: pixfmt.h:264
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:271
AV_PIX_FMT_BGR8
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: pixfmt.h:83
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:285
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AVCOL_PRI_RESERVED0
@ AVCOL_PRI_RESERVED0
Definition: pixfmt.h:534
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:79
AV_PIX_FMT_GBRAP16BE
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
Definition: pixfmt.h:206
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:411
AV_PIX_FMT_DXVA2_VLD
@ AV_PIX_FMT_DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
Definition: pixfmt.h:127
s
#define s(width, name)
Definition: cbs_vp9.c:256
AV_PIX_FMT_GBRP16LE
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
Definition: pixfmt.h:165
AVCHROMA_LOC_TOP
@ AVCHROMA_LOC_TOP
Definition: pixfmt.h:685
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:3276
AVCOL_PRI_NB
@ AVCOL_PRI_NB
Not part of ABI.
Definition: pixfmt.h:551
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:101
AVCOL_TRC_BT1361_ECG
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
Definition: pixfmt.h:571
color_space_names
static const char *const color_space_names[]
Definition: pixdesc.c:2737
AV_PIX_FMT_P416LE
@ AV_PIX_FMT_P416LE
interleaved chroma YUV 4:4:4, 48bpp, little-endian
Definition: pixfmt.h:396
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:284
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:387
AV_PIX_FMT_BAYER_BGGR8
@ AV_PIX_FMT_BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: pixfmt.h:278
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:594
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:193
AV_PIX_FMT_P016BE
@ AV_PIX_FMT_P016BE
like NV12, with 16bpp per component, big-endian
Definition: pixfmt.h:321
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:273
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:180
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:545
color_range_names
static const char *const color_range_names[]
Definition: pixdesc.c:2692
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:87
pix_fmt
static enum AVPixelFormat pix_fmt
Definition: demuxing_decoding.c:41
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:163
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:66
AVCOL_PRI_SMPTE240M
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
Definition: pixfmt.h:542
planes
static const struct @345 planes[]
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:536
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:93
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:80
AVCOL_SPC_CHROMA_DERIVED_CL
@ AVCOL_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
Definition: pixfmt.h:602
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:540
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:155
AV_PIX_FMT_BAYER_RGGB8
@ AV_PIX_FMT_BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
Definition: pixfmt.h:279
AV_PIX_FMT_MEDIACODEC
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
Definition: pixfmt.h:313
AVCOL_PRI_SMPTE170M
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:541
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:177
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:288
av_color_range_name
const char * av_color_range_name(enum AVColorRange range)
Definition: pixdesc.c:3174
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:152
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:150
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:123
AVCOL_TRC_RESERVED0
@ AVCOL_TRC_RESERVED0
Definition: pixfmt.h:559
AV_PIX_FMT_RGB565LE
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: pixfmt.h:106
AV_PIX_FMT_GBRAPF32BE
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
Definition: pixfmt.h:340
AV_PIX_FMT_GBRAP12BE
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
Definition: pixfmt.h:307
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:405
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:405
AVCHROMA_LOC_LEFT
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
Definition: pixfmt.h:682
AV_PIX_FMT_YUYV422
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:67
FF_LOSS_DEPTH
#define FF_LOSS_DEPTH
loss due to color depth change
Definition: pixdesc.h:383
AVCHROMA_LOC_TOPLEFT
@ AVCHROMA_LOC_TOPLEFT
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
Definition: pixfmt.h:684
AVCOL_TRC_IEC61966_2_4
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
Definition: pixfmt.h:570
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:386
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:103
AV_PIX_FMT_YA16LE
@ AV_PIX_FMT_YA16LE
16 bits gray, 16 bits alpha (little-endian)
Definition: pixfmt.h:203
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:78
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:76
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:364
AVCOL_PRI_BT709
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
Definition: pixfmt.h:535
AV_PIX_FMT_BGR565LE
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
Definition: pixfmt.h:111
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:196
FF_COLOR_YUV_JPEG
#define FF_COLOR_YUV_JPEG
YUV color space.
Definition: pixdesc.c:2935
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:365
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:173
AV_PIX_FMT_XVMC
@ AV_PIX_FMT_XVMC
XVideo Motion Acceleration via common packet passing.
Definition: pixfmt.h:292
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:379
av_color_primaries_name
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
Definition: pixdesc.c:3192
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:181
AVCOL_TRC_BT2020_10
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
Definition: pixfmt.h:573
AV_PIX_FMT_RGB8
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
Definition: pixfmt.h:86
AV_PIX_FMT_BGR0
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: pixfmt.h:258
AVCOL_SPC_YCGCO
@ AVCOL_SPC_YCGCO
used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
Definition: pixfmt.h:596
AV_PIX_FMT_OPENCL
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
Definition: pixfmt.h:355
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:84
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:295
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
AV_PIX_FMT_QSV
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
Definition: pixfmt.h:240
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:112
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:169
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:3288
pixdesc_has_alpha
#define pixdesc_has_alpha(pixdesc)
Definition: pixdesc.c:2938
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:94
AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
Definition: pixfmt.h:627
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:263
AVCOL_PRI_BT2020
@ AVCOL_PRI_BT2020
ITU-R BT2020.
Definition: pixfmt.h:544
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:270
AV_PIX_FMT_BGR4_BYTE
@ AV_PIX_FMT_BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: pixfmt.h:85
AV_WB32
#define AV_WB32(p, v)
Definition: intreadwrite.h:419
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:381
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:146
get_color_type
static int get_color_type(const AVPixFmtDescriptor *desc)
Definition: pixdesc.c:2942
color_transfer_names
static const char *const color_transfer_names[]
Definition: pixdesc.c:2715
AVCOL_TRC_SMPTE2084
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
Definition: pixfmt.h:575
AVCOL_PRI_SMPTE431
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition: pixfmt.h:547
AV_PIX_FMT_RGBF32BE
@ AV_PIX_FMT_RGBF32BE
IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian.
Definition: pixfmt.h:417
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
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:297
AVCOL_TRC_SMPTE240M
@ AVCOL_TRC_SMPTE240M
Definition: pixfmt.h:566
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:3126
AVCOL_PRI_FILM
@ AVCOL_PRI_FILM
colour filters using Illuminant C
Definition: pixfmt.h:543
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:2823
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:253
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:282
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:260
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:151
AVCOL_TRC_LOG
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
Definition: pixfmt.h:568
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:130
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:414
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:266
AV_PIX_FMT_YA16BE
@ AV_PIX_FMT_YA16BE
16 bits gray, 16 bits alpha (big-endian)
Definition: pixfmt.h:202
AV_PIX_FMT_GRAY12LE
@ AV_PIX_FMT_GRAY12LE
Y , 12bpp, little-endian.
Definition: pixfmt.h:316
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:160
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:681
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:148
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:400
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:191
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:132
FF_COLOR_RGB
#define FF_COLOR_RGB
RGB color space.
Definition: pixdesc.c:2932
AV_PIX_FMT_GBRP9LE
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
Definition: pixfmt.h:161
AV_WL16
#define AV_WL16(p, v)
Definition: intreadwrite.h:412
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:167
AV_PIX_FMT_GBRAP10LE
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
Definition: pixfmt.h:311
AV_PIX_FMT_BGR565BE
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
Definition: pixfmt.h:110
av_pix_fmt_desc_get_id
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
Definition: pixdesc.c:2877
AV_PIX_FMT_RGB0
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: pixfmt.h:256
AV_PIX_FMT_D3D11
@ AV_PIX_FMT_D3D11
Hardware surfaces for Direct3D11.
Definition: pixfmt.h:333
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:37
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:406
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:390
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: pixfmt.h:119
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:175
AVCOL_SPC_CHROMA_DERIVED_NCL
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
Definition: pixfmt.h:601
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:560
AVChromaLocation
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:680
AV_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:92
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:198
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:176
AV_PIX_FMT_VDPAU
@ AV_PIX_FMT_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
Definition: pixfmt.h:187
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:595
AV_PIX_FMT_VIDEOTOOLBOX
@ AV_PIX_FMT_VIDEOTOOLBOX
hardware decoding through Videotoolbox
Definition: pixfmt.h:302
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:366
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:170
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:108
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:102
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
AVCOL_SPC_BT2020_NCL
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
Definition: pixfmt.h:598
FF_COLOR_XYZ
#define FF_COLOR_XYZ
Definition: pixdesc.c:2936
AVColorSpace
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:587
AV_PIX_FMT_GRAY9BE
@ AV_PIX_FMT_GRAY9BE
Y , 9bpp, big-endian.
Definition: pixfmt.h:335
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:368
av_color_primaries_from_name
int av_color_primaries_from_name(const char *name)
Definition: pixdesc.c:3198
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:280
color_primaries_names
static const char *const color_primaries_names[AVCOL_PRI_NB]
Definition: pixdesc.c:2698
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:192
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:100
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:190
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:382
FF_COLOR_NA
#define FF_COLOR_NA
Definition: pixdesc.c:2931
AV_PIX_FMT_NV21
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
Definition: pixfmt.h:90
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:2984
AV_PIX_FMT_RGB4_BYTE
@ AV_PIX_FMT_RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: pixfmt.h:88
AVCOL_SPC_UNSPECIFIED
@ AVCOL_SPC_UNSPECIFIED
Definition: pixfmt.h:590
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:126
FF_LOSS_COLORSPACE
#define FF_LOSS_COLORSPACE
loss due to color space conversion
Definition: pixdesc.h:384
FF_COLOR_YUV
#define FF_COLOR_YUV
YUV color space.
Definition: pixdesc.c:2934
AV_PIX_FMT_GBRPF32LE
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
Definition: pixfmt.h:339
AV_PIX_FMT_NV42
@ AV_PIX_FMT_NV42
as above, but U and V bytes are swapped
Definition: pixfmt.h:369
AVCOL_RANGE_MPEG
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
Definition: pixfmt.h:644
AV_PIX_FMT_GBRAP16LE
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
Definition: pixfmt.h:207
AV_PIX_FMT_PAL8
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition: pixfmt.h:77
AV_PIX_FMT_GRAY12BE
@ AV_PIX_FMT_GRAY12BE
Y , 12bpp, big-endian.
Definition: pixfmt.h:315
AV_PIX_FMT_YVYU422
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
Definition: pixfmt.h:200
AVCOL_PRI_BT470M
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: pixfmt.h:538
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:257
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:89
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:409
get_pix_fmt_internal
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
Definition: pixdesc.c:2765
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:283
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:389
AV_PIX_FMT_P016LE
@ AV_PIX_FMT_P016LE
like NV12, with 16bpp per component, little-endian
Definition: pixfmt.h:320
get_pix_fmt_depth
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2966
AV_PIX_FMT_GRAYF32BE
@ AV_PIX_FMT_GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
Definition: pixfmt.h:360
pos
unsigned int pos
Definition: spdifenc.c:412
AV_PIX_FMT_GBRP12BE
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
Definition: pixfmt.h:272
AV_PIX_FMT_UYVY422
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:81
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:268
av_get_pix_fmt
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
Definition: pixdesc.c:2790
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:420
AVCOL_TRC_ARIB_STD_B67
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
Definition: pixfmt.h:579
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:3137
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:378
AVCHROMA_LOC_CENTER
@ AVCHROMA_LOC_CENTER
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
Definition: pixfmt.h:683
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AVCOL_SPC_FCC
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: pixfmt.h:592
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:153
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:356
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:393
AV_PIX_FMT_RGBF32LE
@ AV_PIX_FMT_RGBF32LE
IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian.
Definition: pixfmt.h:418
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:565
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:174
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:71
AV_PIX_FMT_RGB565BE
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: pixfmt.h:105
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:122
X_NE
#define X_NE(be, le)
Definition: pixdesc.c:2787
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:158
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:124
desc
const char * desc
Definition: libsvtav1.c:83
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:421
FF_LOSS_COLORQUANT
#define FF_LOSS_COLORQUANT
loss due to color quantization
Definition: pixdesc.h:386
AV_PIX_FMT_GRAY16LE
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
Definition: pixfmt.h:98
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:383
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:70
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:304
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:179
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:562
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:113
AVCOL_PRI_SMPTE432
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
Definition: pixfmt.h:548
FF_LOSS_RESOLUTION
#define FF_LOSS_RESOLUTION
loss due to resolution change
Definition: pixdesc.h:382
AV_PIX_FMT_P216BE
@ AV_PIX_FMT_P216BE
interleaved chroma YUV 4:2:2, 32bpp, big-endian
Definition: pixfmt.h:392
AV_PIX_FMT_GRAY14LE
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
Definition: pixfmt.h:358
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:87
AVCOL_SPC_SMPTE2085
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
Definition: pixfmt.h:600
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:415
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:73
AV_PIX_FMT_GRAY14BE
@ AV_PIX_FMT_GRAY14BE
Y , 14bpp, big-endian.
Definition: pixfmt.h:357
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:182
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:296
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:157
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:183
AV_PIX_FMT_GBRP14LE
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
Definition: pixfmt.h:275
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
AVCHROMA_LOC_NB
@ AVCHROMA_LOC_NB
Not part of ABI.
Definition: pixfmt.h:688
AV_PIX_FMT_0RGB
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: pixfmt.h:255
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:72
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:86
alias
Definition: mccdec.c:62
AV_PIX_FMT_GBRAP10BE
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
Definition: pixfmt.h:310
AVCOL_TRC_SMPTE428
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
Definition: pixfmt.h:577
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:185
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:403
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:98
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:363
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:589
AVColorRange
AVColorRange
Visual content value range.
Definition: pixfmt.h:626
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:131
AVCOL_SPC_ICTCP
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
Definition: pixfmt.h:603
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:265
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:168
av_color_transfer_name
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
Definition: pixdesc.c:3213
AVCHROMA_LOC_BOTTOMLEFT
@ AVCHROMA_LOC_BOTTOMLEFT
Definition: pixfmt.h:686
AV_PIX_FMT_BAYER_GRBG8
@ AV_PIX_FMT_BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
Definition: pixfmt.h:281
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_YUVA422P
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:166
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:2778
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:82
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:138
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:171