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