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_GBRAP14LE] = {
2227  .name = "gbrap14le",
2228  .nb_components = 4,
2229  .log2_chroma_w = 0,
2230  .log2_chroma_h = 0,
2231  .comp = {
2232  { 2, 2, 0, 0, 14 }, /* R */
2233  { 0, 2, 0, 0, 14 }, /* G */
2234  { 1, 2, 0, 0, 14 }, /* B */
2235  { 3, 2, 0, 0, 14 }, /* A */
2236  },
2239  },
2240  [AV_PIX_FMT_GBRAP14BE] = {
2241  .name = "gbrap14be",
2242  .nb_components = 4,
2243  .log2_chroma_w = 0,
2244  .log2_chroma_h = 0,
2245  .comp = {
2246  { 2, 2, 0, 0, 14 }, /* R */
2247  { 0, 2, 0, 0, 14 }, /* G */
2248  { 1, 2, 0, 0, 14 }, /* B */
2249  { 3, 2, 0, 0, 14 }, /* A */
2250  },
2253  },
2254  [AV_PIX_FMT_GBRAP12LE] = {
2255  .name = "gbrap12le",
2256  .nb_components = 4,
2257  .log2_chroma_w = 0,
2258  .log2_chroma_h = 0,
2259  .comp = {
2260  { 2, 2, 0, 0, 12 }, /* R */
2261  { 0, 2, 0, 0, 12 }, /* G */
2262  { 1, 2, 0, 0, 12 }, /* B */
2263  { 3, 2, 0, 0, 12 }, /* A */
2264  },
2267  },
2268  [AV_PIX_FMT_GBRAP12BE] = {
2269  .name = "gbrap12be",
2270  .nb_components = 4,
2271  .log2_chroma_w = 0,
2272  .log2_chroma_h = 0,
2273  .comp = {
2274  { 2, 2, 0, 0, 12 }, /* R */
2275  { 0, 2, 0, 0, 12 }, /* G */
2276  { 1, 2, 0, 0, 12 }, /* B */
2277  { 3, 2, 0, 0, 12 }, /* A */
2278  },
2281  },
2282  [AV_PIX_FMT_GBRAP10LE] = {
2283  .name = "gbrap10le",
2284  .nb_components = 4,
2285  .log2_chroma_w = 0,
2286  .log2_chroma_h = 0,
2287  .comp = {
2288  { 2, 2, 0, 0, 10 }, /* R */
2289  { 0, 2, 0, 0, 10 }, /* G */
2290  { 1, 2, 0, 0, 10 }, /* B */
2291  { 3, 2, 0, 0, 10 }, /* A */
2292  },
2295  },
2296  [AV_PIX_FMT_GBRAP10BE] = {
2297  .name = "gbrap10be",
2298  .nb_components = 4,
2299  .log2_chroma_w = 0,
2300  .log2_chroma_h = 0,
2301  .comp = {
2302  { 2, 2, 0, 0, 10 }, /* R */
2303  { 0, 2, 0, 0, 10 }, /* G */
2304  { 1, 2, 0, 0, 10 }, /* B */
2305  { 3, 2, 0, 0, 10 }, /* A */
2306  },
2309  },
2310  [AV_PIX_FMT_D3D11] = {
2311  .name = "d3d11",
2312  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2313  },
2314  [AV_PIX_FMT_GBRPF32BE] = {
2315  .name = "gbrpf32be",
2316  .nb_components = 3,
2317  .log2_chroma_w = 0,
2318  .log2_chroma_h = 0,
2319  .comp = {
2320  { 2, 4, 0, 0, 32 }, /* R */
2321  { 0, 4, 0, 0, 32 }, /* G */
2322  { 1, 4, 0, 0, 32 }, /* B */
2323  },
2326  },
2327  [AV_PIX_FMT_GBRPF32LE] = {
2328  .name = "gbrpf32le",
2329  .nb_components = 3,
2330  .log2_chroma_w = 0,
2331  .log2_chroma_h = 0,
2332  .comp = {
2333  { 2, 4, 0, 0, 32 }, /* R */
2334  { 0, 4, 0, 0, 32 }, /* G */
2335  { 1, 4, 0, 0, 32 }, /* B */
2336  },
2338  },
2339  [AV_PIX_FMT_GBRAPF32BE] = {
2340  .name = "gbrapf32be",
2341  .nb_components = 4,
2342  .log2_chroma_w = 0,
2343  .log2_chroma_h = 0,
2344  .comp = {
2345  { 2, 4, 0, 0, 32 }, /* R */
2346  { 0, 4, 0, 0, 32 }, /* G */
2347  { 1, 4, 0, 0, 32 }, /* B */
2348  { 3, 4, 0, 0, 32 }, /* A */
2349  },
2353  },
2354  [AV_PIX_FMT_GBRAPF32LE] = {
2355  .name = "gbrapf32le",
2356  .nb_components = 4,
2357  .log2_chroma_w = 0,
2358  .log2_chroma_h = 0,
2359  .comp = {
2360  { 2, 4, 0, 0, 32 }, /* R */
2361  { 0, 4, 0, 0, 32 }, /* G */
2362  { 1, 4, 0, 0, 32 }, /* B */
2363  { 3, 4, 0, 0, 32 }, /* A */
2364  },
2367  },
2368  [AV_PIX_FMT_DRM_PRIME] = {
2369  .name = "drm_prime",
2370  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2371  },
2372  [AV_PIX_FMT_OPENCL] = {
2373  .name = "opencl",
2374  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2375  },
2376  [AV_PIX_FMT_GRAYF32BE] = {
2377  .name = "grayf32be",
2378  .nb_components = 1,
2379  .log2_chroma_w = 0,
2380  .log2_chroma_h = 0,
2381  .comp = {
2382  { 0, 4, 0, 0, 32 }, /* Y */
2383  },
2385  .alias = "yf32be",
2386  },
2387  [AV_PIX_FMT_GRAYF32LE] = {
2388  .name = "grayf32le",
2389  .nb_components = 1,
2390  .log2_chroma_w = 0,
2391  .log2_chroma_h = 0,
2392  .comp = {
2393  { 0, 4, 0, 0, 32 }, /* Y */
2394  },
2395  .flags = AV_PIX_FMT_FLAG_FLOAT,
2396  .alias = "yf32le",
2397  },
2399  .name = "yuva422p12be",
2400  .nb_components = 4,
2401  .log2_chroma_w = 1,
2402  .log2_chroma_h = 0,
2403  .comp = {
2404  { 0, 2, 0, 0, 12 }, /* Y */
2405  { 1, 2, 0, 0, 12 }, /* U */
2406  { 2, 2, 0, 0, 12 }, /* V */
2407  { 3, 2, 0, 0, 12 }, /* A */
2408  },
2410  },
2412  .name = "yuva422p12le",
2413  .nb_components = 4,
2414  .log2_chroma_w = 1,
2415  .log2_chroma_h = 0,
2416  .comp = {
2417  { 0, 2, 0, 0, 12 }, /* Y */
2418  { 1, 2, 0, 0, 12 }, /* U */
2419  { 2, 2, 0, 0, 12 }, /* V */
2420  { 3, 2, 0, 0, 12 }, /* A */
2421  },
2423  },
2425  .name = "yuva444p12be",
2426  .nb_components = 4,
2427  .log2_chroma_w = 0,
2428  .log2_chroma_h = 0,
2429  .comp = {
2430  { 0, 2, 0, 0, 12 }, /* Y */
2431  { 1, 2, 0, 0, 12 }, /* U */
2432  { 2, 2, 0, 0, 12 }, /* V */
2433  { 3, 2, 0, 0, 12 }, /* A */
2434  },
2436  },
2438  .name = "yuva444p12le",
2439  .nb_components = 4,
2440  .log2_chroma_w = 0,
2441  .log2_chroma_h = 0,
2442  .comp = {
2443  { 0, 2, 0, 0, 12 }, /* Y */
2444  { 1, 2, 0, 0, 12 }, /* U */
2445  { 2, 2, 0, 0, 12 }, /* V */
2446  { 3, 2, 0, 0, 12 }, /* A */
2447  },
2449  },
2450  [AV_PIX_FMT_NV24] = {
2451  .name = "nv24",
2452  .nb_components = 3,
2453  .log2_chroma_w = 0,
2454  .log2_chroma_h = 0,
2455  .comp = {
2456  { 0, 1, 0, 0, 8 }, /* Y */
2457  { 1, 2, 0, 0, 8 }, /* U */
2458  { 1, 2, 1, 0, 8 }, /* V */
2459  },
2460  .flags = AV_PIX_FMT_FLAG_PLANAR,
2461  },
2462  [AV_PIX_FMT_NV42] = {
2463  .name = "nv42",
2464  .nb_components = 3,
2465  .log2_chroma_w = 0,
2466  .log2_chroma_h = 0,
2467  .comp = {
2468  { 0, 1, 0, 0, 8 }, /* Y */
2469  { 1, 2, 1, 0, 8 }, /* U */
2470  { 1, 2, 0, 0, 8 }, /* V */
2471  },
2472  .flags = AV_PIX_FMT_FLAG_PLANAR,
2473  },
2474  [AV_PIX_FMT_VULKAN] = {
2475  .name = "vulkan",
2476  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2477  },
2478  [AV_PIX_FMT_P210BE] = {
2479  .name = "p210be",
2480  .nb_components = 3,
2481  .log2_chroma_w = 1,
2482  .log2_chroma_h = 0,
2483  .comp = {
2484  { 0, 2, 0, 6, 10 }, /* Y */
2485  { 1, 4, 0, 6, 10 }, /* U */
2486  { 1, 4, 2, 6, 10 }, /* V */
2487  },
2489  },
2490  [AV_PIX_FMT_P210LE] = {
2491  .name = "p210le",
2492  .nb_components = 3,
2493  .log2_chroma_w = 1,
2494  .log2_chroma_h = 0,
2495  .comp = {
2496  { 0, 2, 0, 6, 10 }, /* Y */
2497  { 1, 4, 0, 6, 10 }, /* U */
2498  { 1, 4, 2, 6, 10 }, /* V */
2499  },
2500  .flags = AV_PIX_FMT_FLAG_PLANAR,
2501  },
2502  [AV_PIX_FMT_P410BE] = {
2503  .name = "p410be",
2504  .nb_components = 3,
2505  .log2_chroma_w = 0,
2506  .log2_chroma_h = 0,
2507  .comp = {
2508  { 0, 2, 0, 6, 10 }, /* Y */
2509  { 1, 4, 0, 6, 10 }, /* U */
2510  { 1, 4, 2, 6, 10 }, /* V */
2511  },
2513  },
2514  [AV_PIX_FMT_P410LE] = {
2515  .name = "p410le",
2516  .nb_components = 3,
2517  .log2_chroma_w = 0,
2518  .log2_chroma_h = 0,
2519  .comp = {
2520  { 0, 2, 0, 6, 10 }, /* Y */
2521  { 1, 4, 0, 6, 10 }, /* U */
2522  { 1, 4, 2, 6, 10 }, /* V */
2523  },
2524  .flags = AV_PIX_FMT_FLAG_PLANAR,
2525  },
2526  [AV_PIX_FMT_P216BE] = {
2527  .name = "p216be",
2528  .nb_components = 3,
2529  .log2_chroma_w = 1,
2530  .log2_chroma_h = 0,
2531  .comp = {
2532  { 0, 2, 0, 0, 16 }, /* Y */
2533  { 1, 4, 0, 0, 16 }, /* U */
2534  { 1, 4, 2, 0, 16 }, /* V */
2535  },
2537  },
2538  [AV_PIX_FMT_P216LE] = {
2539  .name = "p216le",
2540  .nb_components = 3,
2541  .log2_chroma_w = 1,
2542  .log2_chroma_h = 0,
2543  .comp = {
2544  { 0, 2, 0, 0, 16 }, /* Y */
2545  { 1, 4, 0, 0, 16 }, /* U */
2546  { 1, 4, 2, 0, 16 }, /* V */
2547  },
2548  .flags = AV_PIX_FMT_FLAG_PLANAR,
2549  },
2550  [AV_PIX_FMT_P416BE] = {
2551  .name = "p416be",
2552  .nb_components = 3,
2553  .log2_chroma_w = 0,
2554  .log2_chroma_h = 0,
2555  .comp = {
2556  { 0, 2, 0, 0, 16 }, /* Y */
2557  { 1, 4, 0, 0, 16 }, /* U */
2558  { 1, 4, 2, 0, 16 }, /* V */
2559  },
2561  },
2562  [AV_PIX_FMT_P416LE] = {
2563  .name = "p416le",
2564  .nb_components = 3,
2565  .log2_chroma_w = 0,
2566  .log2_chroma_h = 0,
2567  .comp = {
2568  { 0, 2, 0, 0, 16 }, /* Y */
2569  { 1, 4, 0, 0, 16 }, /* U */
2570  { 1, 4, 2, 0, 16 }, /* V */
2571  },
2572  .flags = AV_PIX_FMT_FLAG_PLANAR,
2573  },
2574  [AV_PIX_FMT_VUYA] = {
2575  .name = "vuya",
2576  .nb_components = 4,
2577  .log2_chroma_w = 0,
2578  .log2_chroma_h = 0,
2579  .comp = {
2580  { 0, 4, 2, 0, 8 }, /* Y */
2581  { 0, 4, 1, 0, 8 }, /* U */
2582  { 0, 4, 0, 0, 8 }, /* V */
2583  { 0, 4, 3, 0, 8 }, /* A */
2584  },
2585  .flags = AV_PIX_FMT_FLAG_ALPHA,
2586  },
2587  [AV_PIX_FMT_VUYX] = {
2588  .name = "vuyx",
2589  .nb_components = 3,
2590  .log2_chroma_w = 0,
2591  .log2_chroma_h = 0,
2592  .comp = {
2593  { 0, 4, 2, 0, 8 }, /* Y */
2594  { 0, 4, 1, 0, 8 }, /* U */
2595  { 0, 4, 0, 0, 8 }, /* V */
2596  },
2597  },
2598  [AV_PIX_FMT_RGBAF16BE] = {
2599  .name = "rgbaf16be",
2600  .nb_components = 4,
2601  .log2_chroma_w = 0,
2602  .log2_chroma_h = 0,
2603  .comp = {
2604  { 0, 8, 0, 0, 16 }, /* R */
2605  { 0, 8, 2, 0, 16 }, /* G */
2606  { 0, 8, 4, 0, 16 }, /* B */
2607  { 0, 8, 6, 0, 16 }, /* A */
2608  },
2611  },
2612  [AV_PIX_FMT_RGBAF16LE] = {
2613  .name = "rgbaf16le",
2614  .nb_components = 4,
2615  .log2_chroma_w = 0,
2616  .log2_chroma_h = 0,
2617  .comp = {
2618  { 0, 8, 0, 0, 16 }, /* R */
2619  { 0, 8, 2, 0, 16 }, /* G */
2620  { 0, 8, 4, 0, 16 }, /* B */
2621  { 0, 8, 6, 0, 16 }, /* A */
2622  },
2625  },
2626  [AV_PIX_FMT_Y212LE] = {
2627  .name = "y212le",
2628  .nb_components = 3,
2629  .log2_chroma_w = 1,
2630  .log2_chroma_h = 0,
2631  .comp = {
2632  { 0, 4, 0, 4, 12 }, /* Y */
2633  { 0, 8, 2, 4, 12 }, /* U */
2634  { 0, 8, 6, 4, 12 }, /* V */
2635  },
2636  },
2637  [AV_PIX_FMT_Y212BE] = {
2638  .name = "y212be",
2639  .nb_components = 3,
2640  .log2_chroma_w = 1,
2641  .log2_chroma_h = 0,
2642  .comp = {
2643  { 0, 4, 0, 4, 12 }, /* Y */
2644  { 0, 8, 2, 4, 12 }, /* U */
2645  { 0, 8, 6, 4, 12 }, /* V */
2646  },
2647  .flags = AV_PIX_FMT_FLAG_BE,
2648  },
2649  [AV_PIX_FMT_XV30LE] = {
2650  .name = "xv30le",
2651  .nb_components= 3,
2652  .log2_chroma_w= 0,
2653  .log2_chroma_h= 0,
2654  .comp = {
2655  { 0, 4, 1, 2, 10 }, /* Y */
2656  { 0, 4, 0, 0, 10 }, /* U */
2657  { 0, 4, 2, 4, 10 }, /* V */
2658  },
2659  },
2660  [AV_PIX_FMT_XV30BE] = {
2661  .name = "xv30be",
2662  .nb_components= 3,
2663  .log2_chroma_w= 0,
2664  .log2_chroma_h= 0,
2665  .comp = {
2666  { 0, 32, 10, 0, 10 }, /* Y */
2667  { 0, 32, 0, 0, 10 }, /* U */
2668  { 0, 32, 20, 0, 10 }, /* V */
2669  },
2671  },
2672  [AV_PIX_FMT_XV36LE] = {
2673  .name = "xv36le",
2674  .nb_components= 3,
2675  .log2_chroma_w= 0,
2676  .log2_chroma_h= 0,
2677  .comp = {
2678  { 0, 8, 2, 4, 12 }, /* Y */
2679  { 0, 8, 0, 4, 12 }, /* U */
2680  { 0, 8, 4, 4, 12 }, /* V */
2681  },
2682  },
2683  [AV_PIX_FMT_XV36BE] = {
2684  .name = "xv36be",
2685  .nb_components= 3,
2686  .log2_chroma_w= 0,
2687  .log2_chroma_h= 0,
2688  .comp = {
2689  { 0, 8, 2, 4, 12 }, /* Y */
2690  { 0, 8, 0, 4, 12 }, /* U */
2691  { 0, 8, 4, 4, 12 }, /* V */
2692  },
2693  .flags = AV_PIX_FMT_FLAG_BE,
2694  },
2695  [AV_PIX_FMT_RGBF32BE] = {
2696  .name = "rgbf32be",
2697  .nb_components = 3,
2698  .log2_chroma_w = 0,
2699  .log2_chroma_h = 0,
2700  .comp = {
2701  { 0, 12, 0, 0, 32 }, /* R */
2702  { 0, 12, 4, 0, 32 }, /* G */
2703  { 0, 12, 8, 0, 32 }, /* B */
2704  },
2707  },
2708  [AV_PIX_FMT_RGBF32LE] = {
2709  .name = "rgbf32le",
2710  .nb_components = 3,
2711  .log2_chroma_w = 0,
2712  .log2_chroma_h = 0,
2713  .comp = {
2714  { 0, 12, 0, 0, 32 }, /* R */
2715  { 0, 12, 4, 0, 32 }, /* G */
2716  { 0, 12, 8, 0, 32 }, /* B */
2717  },
2719  },
2720  [AV_PIX_FMT_RGBAF32BE] = {
2721  .name = "rgbaf32be",
2722  .nb_components = 4,
2723  .log2_chroma_w = 0,
2724  .log2_chroma_h = 0,
2725  .comp = {
2726  { 0, 16, 0, 0, 32 }, /* R */
2727  { 0, 16, 4, 0, 32 }, /* G */
2728  { 0, 16, 8, 0, 32 }, /* B */
2729  { 0, 16, 12, 0, 32 }, /* A */
2730  },
2733  },
2734  [AV_PIX_FMT_RGBAF32LE] = {
2735  .name = "rgbaf32le",
2736  .nb_components = 4,
2737  .log2_chroma_w = 0,
2738  .log2_chroma_h = 0,
2739  .comp = {
2740  { 0, 16, 0, 0, 32 }, /* R */
2741  { 0, 16, 4, 0, 32 }, /* G */
2742  { 0, 16, 8, 0, 32 }, /* B */
2743  { 0, 16, 12, 0, 32 }, /* A */
2744  },
2747  },
2748  [AV_PIX_FMT_P212BE] = {
2749  .name = "p212be",
2750  .nb_components = 3,
2751  .log2_chroma_w = 1,
2752  .log2_chroma_h = 0,
2753  .comp = {
2754  { 0, 2, 0, 4, 12 }, /* Y */
2755  { 1, 4, 0, 4, 12 }, /* U */
2756  { 1, 4, 2, 4, 12 }, /* V */
2757  },
2759  },
2760  [AV_PIX_FMT_P212LE] = {
2761  .name = "p212le",
2762  .nb_components = 3,
2763  .log2_chroma_w = 1,
2764  .log2_chroma_h = 0,
2765  .comp = {
2766  { 0, 2, 0, 4, 12 }, /* Y */
2767  { 1, 4, 0, 4, 12 }, /* U */
2768  { 1, 4, 2, 4, 12 }, /* V */
2769  },
2770  .flags = AV_PIX_FMT_FLAG_PLANAR,
2771  },
2772  [AV_PIX_FMT_P412BE] = {
2773  .name = "p412be",
2774  .nb_components = 3,
2775  .log2_chroma_w = 0,
2776  .log2_chroma_h = 0,
2777  .comp = {
2778  { 0, 2, 0, 4, 12 }, /* Y */
2779  { 1, 4, 0, 4, 12 }, /* U */
2780  { 1, 4, 2, 4, 12 }, /* V */
2781  },
2783  },
2784  [AV_PIX_FMT_P412LE] = {
2785  .name = "p412le",
2786  .nb_components = 3,
2787  .log2_chroma_w = 0,
2788  .log2_chroma_h = 0,
2789  .comp = {
2790  { 0, 2, 0, 4, 12 }, /* Y */
2791  { 1, 4, 0, 4, 12 }, /* U */
2792  { 1, 4, 2, 4, 12 }, /* V */
2793  },
2794  .flags = AV_PIX_FMT_FLAG_PLANAR,
2795  },
2796 };
2797 
2798 static const char * const color_range_names[] = {
2799  [AVCOL_RANGE_UNSPECIFIED] = "unknown",
2800  [AVCOL_RANGE_MPEG] = "tv",
2801  [AVCOL_RANGE_JPEG] = "pc",
2802 };
2803 
2804 static const char * const color_primaries_names[AVCOL_PRI_NB] = {
2805  [AVCOL_PRI_RESERVED0] = "reserved",
2806  [AVCOL_PRI_BT709] = "bt709",
2807  [AVCOL_PRI_UNSPECIFIED] = "unknown",
2808  [AVCOL_PRI_RESERVED] = "reserved",
2809  [AVCOL_PRI_BT470M] = "bt470m",
2810  [AVCOL_PRI_BT470BG] = "bt470bg",
2811  [AVCOL_PRI_SMPTE170M] = "smpte170m",
2812  [AVCOL_PRI_SMPTE240M] = "smpte240m",
2813  [AVCOL_PRI_FILM] = "film",
2814  [AVCOL_PRI_BT2020] = "bt2020",
2815  [AVCOL_PRI_SMPTE428] = "smpte428",
2816  [AVCOL_PRI_SMPTE431] = "smpte431",
2817  [AVCOL_PRI_SMPTE432] = "smpte432",
2818  [AVCOL_PRI_EBU3213] = "ebu3213",
2819 };
2820 
2821 static const char * const color_transfer_names[] = {
2822  [AVCOL_TRC_RESERVED0] = "reserved",
2823  [AVCOL_TRC_BT709] = "bt709",
2824  [AVCOL_TRC_UNSPECIFIED] = "unknown",
2825  [AVCOL_TRC_RESERVED] = "reserved",
2826  [AVCOL_TRC_GAMMA22] = "bt470m",
2827  [AVCOL_TRC_GAMMA28] = "bt470bg",
2828  [AVCOL_TRC_SMPTE170M] = "smpte170m",
2829  [AVCOL_TRC_SMPTE240M] = "smpte240m",
2830  [AVCOL_TRC_LINEAR] = "linear",
2831  [AVCOL_TRC_LOG] = "log100",
2832  [AVCOL_TRC_LOG_SQRT] = "log316",
2833  [AVCOL_TRC_IEC61966_2_4] = "iec61966-2-4",
2834  [AVCOL_TRC_BT1361_ECG] = "bt1361e",
2835  [AVCOL_TRC_IEC61966_2_1] = "iec61966-2-1",
2836  [AVCOL_TRC_BT2020_10] = "bt2020-10",
2837  [AVCOL_TRC_BT2020_12] = "bt2020-12",
2838  [AVCOL_TRC_SMPTE2084] = "smpte2084",
2839  [AVCOL_TRC_SMPTE428] = "smpte428",
2840  [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67",
2841 };
2842 
2843 static const char * const color_space_names[] = {
2844  [AVCOL_SPC_RGB] = "gbr",
2845  [AVCOL_SPC_BT709] = "bt709",
2846  [AVCOL_SPC_UNSPECIFIED] = "unknown",
2847  [AVCOL_SPC_RESERVED] = "reserved",
2848  [AVCOL_SPC_FCC] = "fcc",
2849  [AVCOL_SPC_BT470BG] = "bt470bg",
2850  [AVCOL_SPC_SMPTE170M] = "smpte170m",
2851  [AVCOL_SPC_SMPTE240M] = "smpte240m",
2852  [AVCOL_SPC_YCGCO] = "ycgco",
2853  [AVCOL_SPC_BT2020_NCL] = "bt2020nc",
2854  [AVCOL_SPC_BT2020_CL] = "bt2020c",
2855  [AVCOL_SPC_SMPTE2085] = "smpte2085",
2856  [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
2857  [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
2858  [AVCOL_SPC_ICTCP] = "ictcp",
2859 };
2860 
2861 static const char * const chroma_location_names[] = {
2862  [AVCHROMA_LOC_UNSPECIFIED] = "unspecified",
2863  [AVCHROMA_LOC_LEFT] = "left",
2864  [AVCHROMA_LOC_CENTER] = "center",
2865  [AVCHROMA_LOC_TOPLEFT] = "topleft",
2866  [AVCHROMA_LOC_TOP] = "top",
2867  [AVCHROMA_LOC_BOTTOMLEFT] = "bottomleft",
2868  [AVCHROMA_LOC_BOTTOM] = "bottom",
2869 };
2870 
2871 static enum AVPixelFormat get_pix_fmt_internal(const char *name)
2872 {
2873  enum AVPixelFormat pix_fmt;
2874 
2875  for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
2877  (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
2879  return pix_fmt;
2880 
2881  return AV_PIX_FMT_NONE;
2882 }
2883 
2885 {
2886  return (unsigned)pix_fmt < AV_PIX_FMT_NB ?
2888 }
2889 
2890 #if HAVE_BIGENDIAN
2891 # define X_NE(be, le) be
2892 #else
2893 # define X_NE(be, le) le
2894 #endif
2895 
2897 {
2898  enum AVPixelFormat pix_fmt;
2899 
2900  if (!strcmp(name, "rgb32"))
2901  name = X_NE("argb", "bgra");
2902  else if (!strcmp(name, "bgr32"))
2903  name = X_NE("abgr", "rgba");
2904 
2906  if (pix_fmt == AV_PIX_FMT_NONE) {
2907  char name2[32];
2908 
2909  snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le"));
2910  pix_fmt = get_pix_fmt_internal(name2);
2911  }
2912 
2913  return pix_fmt;
2914 }
2915 
2917 {
2918  int c, bits = 0;
2919  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2920 
2921  for (c = 0; c < pixdesc->nb_components; c++) {
2922  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2923  bits += pixdesc->comp[c].depth << s;
2924  }
2925 
2926  return bits >> log2_pixels;
2927 }
2928 
2930 {
2931  int c, bits = 0;
2932  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2933  int steps[4] = {0};
2934 
2935  for (c = 0; c < pixdesc->nb_components; c++) {
2936  const AVComponentDescriptor *comp = &pixdesc->comp[c];
2937  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2938  steps[comp->plane] = comp->step << s;
2939  }
2940  for (c = 0; c < 4; c++)
2941  bits += steps[c];
2942 
2943  if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM))
2944  bits *= 8;
2945 
2946  return bits >> log2_pixels;
2947 }
2948 
2949 char *av_get_pix_fmt_string(char *buf, int buf_size,
2950  enum AVPixelFormat pix_fmt)
2951 {
2952  /* print header */
2953  if (pix_fmt < 0) {
2954  snprintf (buf, buf_size, "name" " nb_components" " nb_bits");
2955  } else {
2957  snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name,
2958  pixdesc->nb_components, av_get_bits_per_pixel(pixdesc));
2959  }
2960 
2961  return buf;
2962 }
2963 
2965 {
2966  if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
2967  return NULL;
2969 }
2970 
2972 {
2973  if (!prev)
2974  return &av_pix_fmt_descriptors[0];
2976  prev++;
2977  if (prev->name)
2978  return prev;
2979  }
2980  return NULL;
2981 }
2982 
2984 {
2985  if (desc < av_pix_fmt_descriptors ||
2987  return AV_PIX_FMT_NONE;
2988 
2989  return desc - av_pix_fmt_descriptors;
2990 }
2991 
2993  int *h_shift, int *v_shift)
2994 {
2996  if (!desc)
2997  return AVERROR(ENOSYS);
2998  *h_shift = desc->log2_chroma_w;
2999  *v_shift = desc->log2_chroma_h;
3000 
3001  return 0;
3002 }
3003 
3005 {
3007  int i, planes[4] = { 0 }, ret = 0;
3008 
3009  if (!desc)
3010  return AVERROR(EINVAL);
3011 
3012  for (i = 0; i < desc->nb_components; i++)
3013  planes[desc->comp[i].plane] = 1;
3014  for (i = 0; i < FF_ARRAY_ELEMS(planes); i++)
3015  ret += planes[i];
3016  return ret;
3017 }
3018 
3020 {
3022  char name[16];
3023  int i;
3024 
3025  if (!desc || strlen(desc->name) < 2)
3026  return AV_PIX_FMT_NONE;
3027  av_strlcpy(name, desc->name, sizeof(name));
3028  i = strlen(name) - 2;
3029  if (strcmp(name + i, "be") && strcmp(name + i, "le"))
3030  return AV_PIX_FMT_NONE;
3031 
3032  name[i] ^= 'b' ^ 'l';
3033 
3034  return get_pix_fmt_internal(name);
3035 }
3036 
3037 #define FF_COLOR_NA -1
3038 #define FF_COLOR_RGB 0 /**< RGB color space */
3039 #define FF_COLOR_GRAY 1 /**< gray color space */
3040 #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
3041 #define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
3042 #define FF_COLOR_XYZ 4
3043 
3044 #define pixdesc_has_alpha(pixdesc) \
3045  ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
3046 
3047 
3049  if (desc->flags & AV_PIX_FMT_FLAG_PAL)
3050  return FF_COLOR_RGB;
3051 
3052  if(desc->nb_components == 1 || desc->nb_components == 2)
3053  return FF_COLOR_GRAY;
3054 
3055  if (desc->name) {
3056  if (av_strstart(desc->name, "yuvj", NULL))
3057  return FF_COLOR_YUV_JPEG;
3058 
3059  if (av_strstart(desc->name, "xyz", NULL))
3060  return FF_COLOR_XYZ;
3061  }
3062 
3063  if(desc->flags & AV_PIX_FMT_FLAG_RGB)
3064  return FF_COLOR_RGB;
3065 
3066  if(desc->nb_components == 0)
3067  return FF_COLOR_NA;
3068 
3069  return FF_COLOR_YUV;
3070 }
3071 
3072 static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
3073 {
3075  int i;
3076 
3077  if (!desc || !desc->nb_components) {
3078  *min = *max = 0;
3079  return AVERROR(EINVAL);
3080  }
3081 
3082  *min = INT_MAX, *max = -INT_MAX;
3083  for (i = 0; i < desc->nb_components; i++) {
3084  *min = FFMIN(desc->comp[i].depth, *min);
3085  *max = FFMAX(desc->comp[i].depth, *max);
3086  }
3087  return 0;
3088 }
3089 
3090 static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
3091  enum AVPixelFormat src_pix_fmt,
3092  unsigned *lossp, unsigned consider)
3093 {
3094  const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
3095  const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
3096  int src_color, dst_color;
3097  int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
3098  int ret, loss, i, nb_components;
3099  int score = INT_MAX - 1;
3100 
3101  if (!src_desc || !dst_desc)
3102  return -4;
3103 
3104  if ((src_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) ||
3105  (dst_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
3106  if (dst_pix_fmt == src_pix_fmt)
3107  return -1;
3108  else
3109  return -2;
3110  }
3111 
3112  /* compute loss */
3113  *lossp = loss = 0;
3114 
3115  if (dst_pix_fmt == src_pix_fmt)
3116  return INT_MAX;
3117 
3118  if ((ret = get_pix_fmt_depth(&src_min_depth, &src_max_depth, src_pix_fmt)) < 0)
3119  return -3;
3120  if ((ret = get_pix_fmt_depth(&dst_min_depth, &dst_max_depth, dst_pix_fmt)) < 0)
3121  return -3;
3122 
3123  src_color = get_color_type(src_desc);
3124  dst_color = get_color_type(dst_desc);
3125  if (dst_pix_fmt == AV_PIX_FMT_PAL8)
3126  nb_components = FFMIN(src_desc->nb_components, 4);
3127  else
3128  nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components);
3129 
3130  for (i = 0; i < nb_components; i++) {
3131  int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1);
3132  int depth_delta = src_desc->comp[i].depth - 1 - depth_minus1;
3133  if (depth_delta > 0 && (consider & FF_LOSS_DEPTH)) {
3134  loss |= FF_LOSS_DEPTH;
3135  score -= 65536 >> depth_minus1;
3136  } else if (depth_delta < 0 && (consider & FF_LOSS_EXCESS_DEPTH)) {
3137  // Favour formats where bit depth exactly matches. If all other
3138  // scoring is equal, we'd rather use the bit depth that most closely
3139  // matches the source.
3140  loss |= FF_LOSS_EXCESS_DEPTH;
3141  score += depth_delta;
3142  }
3143  }
3144 
3145  if (consider & FF_LOSS_RESOLUTION) {
3146  if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w) {
3147  loss |= FF_LOSS_RESOLUTION;
3148  score -= 256 << dst_desc->log2_chroma_w;
3149  }
3150  if (dst_desc->log2_chroma_h > src_desc->log2_chroma_h) {
3151  loss |= FF_LOSS_RESOLUTION;
3152  score -= 256 << dst_desc->log2_chroma_h;
3153  }
3154  // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side
3155  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 &&
3156  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) {
3157  score += 512;
3158  }
3159  }
3160 
3161  if (consider & FF_LOSS_EXCESS_RESOLUTION) {
3162  // Favour formats where chroma subsampling exactly matches. If all other
3163  // scoring is equal, we'd rather use the subsampling that most closely
3164  // matches the source.
3165  if (dst_desc->log2_chroma_w < src_desc->log2_chroma_w) {
3166  loss |= FF_LOSS_EXCESS_RESOLUTION;
3167  score -= 1 << (src_desc->log2_chroma_w - dst_desc->log2_chroma_w);
3168  }
3169 
3170  if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) {
3171  loss |= FF_LOSS_EXCESS_RESOLUTION;
3172  score -= 1 << (src_desc->log2_chroma_h - dst_desc->log2_chroma_h);
3173  }
3174 
3175  // don't favour 411 over 420, because 420 has much better support on the
3176  // decoder side.
3177  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 2 &&
3178  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 2) {
3179  score += 4;
3180  }
3181  }
3182 
3183  if(consider & FF_LOSS_COLORSPACE)
3184  switch(dst_color) {
3185  case FF_COLOR_RGB:
3186  if (src_color != FF_COLOR_RGB &&
3187  src_color != FF_COLOR_GRAY)
3188  loss |= FF_LOSS_COLORSPACE;
3189  break;
3190  case FF_COLOR_GRAY:
3191  if (src_color != FF_COLOR_GRAY)
3192  loss |= FF_LOSS_COLORSPACE;
3193  break;
3194  case FF_COLOR_YUV:
3195  if (src_color != FF_COLOR_YUV)
3196  loss |= FF_LOSS_COLORSPACE;
3197  break;
3198  case FF_COLOR_YUV_JPEG:
3199  if (src_color != FF_COLOR_YUV_JPEG &&
3200  src_color != FF_COLOR_YUV &&
3201  src_color != FF_COLOR_GRAY)
3202  loss |= FF_LOSS_COLORSPACE;
3203  break;
3204  default:
3205  /* fail safe test */
3206  if (src_color != dst_color)
3207  loss |= FF_LOSS_COLORSPACE;
3208  break;
3209  }
3210  if(loss & FF_LOSS_COLORSPACE)
3211  score -= (nb_components * 65536) >> FFMIN(dst_desc->comp[0].depth - 1, src_desc->comp[0].depth - 1);
3212 
3213  if (dst_color == FF_COLOR_GRAY &&
3214  src_color != FF_COLOR_GRAY && (consider & FF_LOSS_CHROMA)) {
3215  loss |= FF_LOSS_CHROMA;
3216  score -= 2 * 65536;
3217  }
3218  if (!pixdesc_has_alpha(dst_desc) && (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))) {
3219  loss |= FF_LOSS_ALPHA;
3220  score -= 65536;
3221  }
3222  if (dst_pix_fmt == AV_PIX_FMT_PAL8 && (consider & FF_LOSS_COLORQUANT) &&
3223  (src_pix_fmt != AV_PIX_FMT_PAL8 && (src_color != FF_COLOR_GRAY || (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))))) {
3224  loss |= FF_LOSS_COLORQUANT;
3225  score -= 65536;
3226  }
3227 
3228  *lossp = loss;
3229  return score;
3230 }
3231 
3232 int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
3233  enum AVPixelFormat src_pix_fmt,
3234  int has_alpha)
3235 {
3236  int loss;
3237  int ret = get_pix_fmt_score(dst_pix_fmt, src_pix_fmt, &loss, has_alpha ? ~0 : ~FF_LOSS_ALPHA);
3238  if (ret < 0)
3239  return ret;
3240  return loss;
3241 }
3242 
3243 enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
3244  enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
3245 {
3246  enum AVPixelFormat dst_pix_fmt;
3247  int loss1, loss2, loss_mask;
3248  const AVPixFmtDescriptor *desc1 = av_pix_fmt_desc_get(dst_pix_fmt1);
3249  const AVPixFmtDescriptor *desc2 = av_pix_fmt_desc_get(dst_pix_fmt2);
3250  int score1, score2;
3251 
3252  if (!desc1) {
3253  dst_pix_fmt = dst_pix_fmt2;
3254  } else if (!desc2) {
3255  dst_pix_fmt = dst_pix_fmt1;
3256  } else {
3257  loss_mask= loss_ptr?~*loss_ptr:~0; /* use loss mask if provided */
3258  if(!has_alpha)
3259  loss_mask &= ~FF_LOSS_ALPHA;
3260 
3261  score1 = get_pix_fmt_score(dst_pix_fmt1, src_pix_fmt, &loss1, loss_mask);
3262  score2 = get_pix_fmt_score(dst_pix_fmt2, src_pix_fmt, &loss2, loss_mask);
3263 
3264  if (score1 == score2) {
3266  dst_pix_fmt = av_get_padded_bits_per_pixel(desc2) < av_get_padded_bits_per_pixel(desc1) ? dst_pix_fmt2 : dst_pix_fmt1;
3267  } else {
3268  dst_pix_fmt = desc2->nb_components < desc1->nb_components ? dst_pix_fmt2 : dst_pix_fmt1;
3269  }
3270  } else {
3271  dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
3272  }
3273  }
3274 
3275  if (loss_ptr)
3276  *loss_ptr = av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha);
3277  return dst_pix_fmt;
3278 }
3279 
3281 {
3282  return (unsigned) range < AVCOL_RANGE_NB ?
3284 }
3285 
3287 {
3288  int i;
3289 
3290  for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) {
3292  return i;
3293  }
3294 
3295  return AVERROR(EINVAL);
3296 }
3297 
3299 {
3300  return (unsigned) primaries < AVCOL_PRI_NB ?
3302 }
3303 
3305 {
3306  int i;
3307 
3308  for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) {
3309  if (!color_primaries_names[i])
3310  continue;
3311 
3313  return i;
3314  }
3315 
3316  return AVERROR(EINVAL);
3317 }
3318 
3320 {
3321  return (unsigned) transfer < AVCOL_TRC_NB ?
3323 }
3324 
3326 {
3327  int i;
3328 
3329  for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) {
3330  if (!color_transfer_names[i])
3331  continue;
3332 
3334  return i;
3335  }
3336 
3337  return AVERROR(EINVAL);
3338 }
3339 
3341 {
3342  return (unsigned) space < AVCOL_SPC_NB ?
3344 }
3345 
3347 {
3348  int i;
3349 
3350  for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) {
3351  if (!color_space_names[i])
3352  continue;
3353 
3355  return i;
3356  }
3357 
3358  return AVERROR(EINVAL);
3359 }
3360 
3361 const char *av_chroma_location_name(enum AVChromaLocation location)
3362 {
3363  return (unsigned) location < AVCHROMA_LOC_NB ?
3364  chroma_location_names[location] : NULL;
3365 }
3366 
3368 {
3369  int i;
3370 
3371  for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) {
3372  if (!chroma_location_names[i])
3373  continue;
3374 
3376  return i;
3377  }
3378 
3379  return AVERROR(EINVAL);
3380 }
3381 
3382 int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
3383 {
3384  if (pos <= AVCHROMA_LOC_UNSPECIFIED || pos >= AVCHROMA_LOC_NB)
3385  return AVERROR(EINVAL);
3386  pos--;
3387 
3388  *xpos = (pos&1) * 128;
3389  *ypos = ((pos>>1)^(pos<4)) * 128;
3390 
3391  return 0;
3392 }
3393 
3395 {
3396  int pos, xout, yout;
3397 
3398  for (pos = AVCHROMA_LOC_UNSPECIFIED + 1; pos < AVCHROMA_LOC_NB; pos++) {
3399  if (av_chroma_location_enum_to_pos(&xout, &yout, pos) == 0 && xout == xpos && yout == ypos)
3400  return pos;
3401  }
3402  return AVCHROMA_LOC_UNSPECIFIED;
3403 }
AVCOL_PRI_RESERVED
@ AVCOL_PRI_RESERVED
Definition: pixfmt.h:549
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:3019
AV_PIX_FMT_YUV420P9LE
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:147
AV_PIX_FMT_XV30LE
@ AV_PIX_FMT_XV30LE
packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channe...
Definition: pixfmt.h:412
AV_PIX_FMT_CUDA
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
Definition: pixfmt.h:253
AV_PIX_FMT_GRAY10BE
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
Definition: pixfmt.h:317
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
AV_PIX_FMT_BAYER_GBRG16LE
@ AV_PIX_FMT_BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:286
AV_PIX_FMT_BGR48LE
@ AV_PIX_FMT_BGR48LE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:139
AVCOL_PRI_EBU3213
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
Definition: pixfmt.h:561
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:424
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:570
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:2964
AVCOL_TRC_LINEAR
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
Definition: pixfmt.h:579
AVCHROMA_LOC_BOTTOM
@ AVCHROMA_LOC_BOTTOM
Definition: pixfmt.h:699
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:3346
AVCOL_TRC_NB
@ AVCOL_TRC_NB
Not part of ABI.
Definition: pixfmt.h:592
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:3286
w
uint8_t w
Definition: llviddspenc.c:38
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
Full range content.
Definition: pixfmt.h:673
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
AV_PIX_FMT_P412BE
@ AV_PIX_FMT_P412BE
interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian
Definition: pixfmt.h:426
AVPixFmtDescriptor::name
const char * name
Definition: pixdesc.h:70
AVCOL_SPC_NB
@ AVCOL_SPC_NB
Not part of ABI.
Definition: pixfmt.h:616
AVCOL_TRC_UNSPECIFIED
@ AVCOL_TRC_UNSPECIFIED
Definition: pixfmt.h:573
data
const char data[16]
Definition: mxf.c:148
AV_PIX_FMT_P010BE
@ AV_PIX_FMT_P010BE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h: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:2971
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:600
AVCOL_TRC_BT2020_12
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
Definition: pixfmt.h:586
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:2916
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:2949
AVColorPrimaries
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:545
FF_COLOR_GRAY
#define FF_COLOR_GRAY
gray color space
Definition: pixdesc.c:3039
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
AV_PIX_FMT_GBRAP14BE
@ AV_PIX_FMT_GBRAP14BE
planar GBR 4:4:4:4 56bpp, big-endian
Definition: pixfmt.h:429
AVCOL_SPC_BT2020_CL
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
Definition: pixfmt.h:611
av_chroma_location_name
const char * av_chroma_location_name(enum AVChromaLocation location)
Definition: pixdesc.c:3361
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:432
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
primaries
enum AVColorPrimaries primaries
Definition: mediacodec_wrapper.c:2664
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3004
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:605
av_chroma_location_from_name
int av_chroma_location_from_name(const char *name)
Definition: pixdesc.c:3367
AVCOL_SPC_RESERVED
@ AVCOL_SPC_RESERVED
reserved for future use by ITU-T and ISO/IEC just like 15-255 are
Definition: pixfmt.h:603
AVCOL_TRC_IEC61966_2_1
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
Definition: pixfmt.h:584
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:3340
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:674
AVCOL_TRC_GAMMA28
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
Definition: pixfmt.h:576
av_color_transfer_from_name
int av_color_transfer_from_name(const char *name)
Definition: pixdesc.c:3325
val
static double val(void *priv, double ch)
Definition: aeval.c:78
av_pix_fmt_get_chroma_sub_sample
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
Definition: pixdesc.c:2992
chroma_location_names
static const char *const chroma_location_names[]
Definition: pixdesc.c:2861
AVCOL_TRC_LOG_SQRT
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
Definition: pixfmt.h:581
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:575
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:546
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:198
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:697
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:3382
AVCOL_PRI_NB
@ AVCOL_PRI_NB
Not part of ABI.
Definition: pixfmt.h:563
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:583
color_space_names
static const char *const color_space_names[]
Definition: pixdesc.c:2843
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:606
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:557
color_range_names
static const char *const color_range_names[]
Definition: pixdesc.c:2798
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:554
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:548
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:614
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:552
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:553
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:3280
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:571
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:403
AVCHROMA_LOC_LEFT
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
Definition: pixfmt.h:694
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:696
AVCOL_TRC_IEC61966_2_4
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
Definition: pixfmt.h:582
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:547
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:3041
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:3298
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:585
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:608
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:3394
pixdesc_has_alpha
#define pixdesc_has_alpha(pixdesc)
Definition: pixdesc.c:3044
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:639
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:556
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:417
AV_PIX_FMT_X2RGB10LE
@ AV_PIX_FMT_X2RGB10LE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:381
AV_PIX_FMT_P212LE
@ AV_PIX_FMT_P212LE
interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian
Definition: pixfmt.h:424
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:3048
color_transfer_names
static const char *const color_transfer_names[]
Definition: pixdesc.c:2821
AVCOL_TRC_SMPTE2084
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
Definition: pixfmt.h:587
AVCOL_PRI_SMPTE431
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition: pixfmt.h:559
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:578
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:3232
AVCOL_PRI_FILM
@ AVCOL_PRI_FILM
colour filters using Illuminant C
Definition: pixfmt.h:555
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:2929
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:262
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:580
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:693
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
range
enum AVColorRange range
Definition: mediacodec_wrapper.c:2646
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:3038
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:410
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h: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:2983
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:36
AV_PIX_FMT_P012BE
@ AV_PIX_FMT_P012BE
like NV12, with 12bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h: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:613
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:572
AVChromaLocation
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:692
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:607
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:255
AVCOL_SPC_BT2020_NCL
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
Definition: pixfmt.h:610
transfer
enum AVColorTransferCharacteristic transfer
Definition: mediacodec_wrapper.c:2674
FF_COLOR_XYZ
#define FF_COLOR_XYZ
Definition: pixdesc.c:3042
AVColorSpace
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:599
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:3304
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
planes
static const struct @363 planes[]
color_primaries_names
static const char *const color_primaries_names[AVCOL_PRI_NB]
Definition: pixdesc.c:2804
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:3037
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:3090
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:602
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:3040
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:656
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:550
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:2871
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:3072
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:2896
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:591
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:3243
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:695
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:604
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:345
AVPixFmtDescriptor::comp
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
Definition: pixdesc.h:105
AV_PIX_FMT_FLAG_PLANAR
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
Definition: pixdesc.h:132
AV_PIX_FMT_P216LE
@ AV_PIX_FMT_P216LE
interleaved chroma YUV 4:2:2, 32bpp, little-endian
Definition: pixfmt.h: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:577
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:2893
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
AV_PIX_FMT_P212BE
@ AV_PIX_FMT_P212BE
interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian
Definition: pixfmt.h:423
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:574
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:560
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_P412LE
@ AV_PIX_FMT_P412LE
interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian
Definition: pixfmt.h:427
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:612
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:474
AVCHROMA_LOC_NB
@ AVCHROMA_LOC_NB
Not part of ABI.
Definition: pixfmt.h:700
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:85
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:589
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:601
AVColorRange
AVColorRange
Visual content value range.
Definition: pixfmt.h:638
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:615
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:3319
AVCHROMA_LOC_BOTTOMLEFT
@ AVCHROMA_LOC_BOTTOMLEFT
Definition: pixfmt.h:698
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_GBRAP14LE
@ AV_PIX_FMT_GBRAP14LE
planar GBR 4:4:4:4 56bpp, little-endian
Definition: pixfmt.h:430
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:2884
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