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