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 "avassert.h"
26 #include "avstring.h"
27 #include "common.h"
28 #include "pixfmt.h"
29 #include "pixdesc.h"
30 #include "internal.h"
31 #include "intreadwrite.h"
32 #include "version.h"
33 
34 void av_read_image_line2(void *dst,
35  const uint8_t *data[4], const int linesize[4],
36  const AVPixFmtDescriptor *desc,
37  int x, int y, int c, int w,
38  int read_pal_component,
39  int dst_element_size)
40 {
42  int plane = comp.plane;
43  int depth = comp.depth;
44  unsigned mask = (1ULL << depth) - 1;
45  int shift = comp.shift;
46  int step = comp.step;
47  int flags = desc->flags;
48  uint16_t *dst16 = dst;
49  uint32_t *dst32 = dst;
50 
52  int skip = x * step + comp.offset;
53  const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
54  int shift = 8 - depth - (skip & 7);
55 
56  while (w--) {
57  int val = (*p >> shift) & mask;
58  if (read_pal_component)
59  val = data[1][4*val + c];
60  shift -= step;
61  p -= shift >> 3;
62  shift &= 7;
63  if (dst_element_size == 4) *dst32++ = val;
64  else *dst16++ = val;
65  }
66  } else {
67  const uint8_t *p = data[plane] + y * linesize[plane] +
68  x * step + comp.offset;
69  int is_8bit = shift + depth <= 8;
70  int is_16bit= shift + depth <=16;
71 
72  if (is_8bit)
73  p += !!(flags & AV_PIX_FMT_FLAG_BE);
74 
75  while (w--) {
76  unsigned val;
77  if (is_8bit) val = *p;
78  else if(is_16bit) val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p);
79  else val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB32(p) : AV_RL32(p);
80  val = (val >> shift) & mask;
81  if (read_pal_component)
82  val = data[1][4 * val + c];
83  p += step;
84  if (dst_element_size == 4) *dst32++ = val;
85  else *dst16++ = val;
86  }
87  }
88 }
89 
90 void av_read_image_line(uint16_t *dst,
91  const uint8_t *data[4], const int linesize[4],
92  const AVPixFmtDescriptor *desc,
93  int x, int y, int c, int w,
94  int read_pal_component)
95 {
96  av_read_image_line2(dst, data, linesize, desc,x, y, c, w,
97  read_pal_component,
98  2);
99 }
100 
101 void av_write_image_line2(const void *src,
102  uint8_t *data[4], const int linesize[4],
103  const AVPixFmtDescriptor *desc,
104  int x, int y, int c, int w, int src_element_size)
105 {
106  AVComponentDescriptor comp = desc->comp[c];
107  int plane = comp.plane;
108  int depth = comp.depth;
109  int step = comp.step;
110  int flags = desc->flags;
111  const uint32_t *src32 = src;
112  const uint16_t *src16 = src;
113 
115  int skip = x * step + comp.offset;
116  uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
117  int shift = 8 - depth - (skip & 7);
118 
119  while (w--) {
120  *p |= (src_element_size == 4 ? *src32++ : *src16++) << shift;
121  shift -= step;
122  p -= shift >> 3;
123  shift &= 7;
124  }
125  } else {
126  int shift = comp.shift;
127  uint8_t *p = data[plane] + y * linesize[plane] +
128  x * step + comp.offset;
129 
130  if (shift + depth <= 8) {
131  p += !!(flags & AV_PIX_FMT_FLAG_BE);
132  while (w--) {
133  *p |= ((src_element_size == 4 ? *src32++ : *src16++) << shift);
134  p += step;
135  }
136  } else {
137  while (w--) {
138  unsigned s = (src_element_size == 4 ? *src32++ : *src16++);
139  if (shift + depth <= 16) {
140  if (flags & AV_PIX_FMT_FLAG_BE) {
141  uint16_t val = AV_RB16(p) | (s << shift);
142  AV_WB16(p, val);
143  } else {
144  uint16_t val = AV_RL16(p) | (s << shift);
145  AV_WL16(p, val);
146  }
147  } else {
148  if (flags & AV_PIX_FMT_FLAG_BE) {
149  uint32_t val = AV_RB32(p) | (s << shift);
150  AV_WB32(p, val);
151  } else {
152  uint32_t val = AV_RL32(p) | (s << shift);
153  AV_WL32(p, val);
154  }
155  }
156  p += step;
157  }
158  }
159  }
160 }
161 
162 void av_write_image_line(const uint16_t *src,
163  uint8_t *data[4], const int linesize[4],
164  const AVPixFmtDescriptor *desc,
165  int x, int y, int c, int w)
166 {
167  av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2);
168 }
169 
170 #if FF_API_PLUS1_MINUS1
172 #endif
174  [AV_PIX_FMT_YUV420P] = {
175  .name = "yuv420p",
176  .nb_components = 3,
177  .log2_chroma_w = 1,
178  .log2_chroma_h = 1,
179  .comp = {
180  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
181  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
182  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
183  },
184  .flags = AV_PIX_FMT_FLAG_PLANAR,
185  },
186  [AV_PIX_FMT_YUYV422] = {
187  .name = "yuyv422",
188  .nb_components = 3,
189  .log2_chroma_w = 1,
190  .log2_chroma_h = 0,
191  .comp = {
192  { 0, 2, 0, 0, 8, 1, 7, 1 }, /* Y */
193  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* U */
194  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* V */
195  },
196  },
197  [AV_PIX_FMT_YVYU422] = {
198  .name = "yvyu422",
199  .nb_components = 3,
200  .log2_chroma_w = 1,
201  .log2_chroma_h = 0,
202  .comp = {
203  { 0, 2, 0, 0, 8, 1, 7, 1 }, /* Y */
204  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* U */
205  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* V */
206  },
207  },
208  [AV_PIX_FMT_Y210LE] = {
209  .name = "y210le",
210  .nb_components = 3,
211  .log2_chroma_w = 1,
212  .log2_chroma_h = 0,
213  .comp = {
214  { 0, 4, 0, 6, 10, 3, 9, 1 }, /* Y */
215  { 0, 8, 2, 6, 10, 7, 9, 3 }, /* U */
216  { 0, 8, 6, 6, 10, 7, 9, 7 }, /* V */
217  },
218  },
219  [AV_PIX_FMT_Y210BE] = {
220  .name = "y210be",
221  .nb_components = 3,
222  .log2_chroma_w = 1,
223  .log2_chroma_h = 0,
224  .comp = {
225  { 0, 4, 0, 6, 10, 3, 9, 1 }, /* Y */
226  { 0, 8, 2, 6, 10, 7, 9, 3 }, /* U */
227  { 0, 8, 6, 6, 10, 7, 9, 7 }, /* V */
228  },
229  .flags = AV_PIX_FMT_FLAG_BE,
230  },
231  [AV_PIX_FMT_RGB24] = {
232  .name = "rgb24",
233  .nb_components = 3,
234  .log2_chroma_w = 0,
235  .log2_chroma_h = 0,
236  .comp = {
237  { 0, 3, 0, 0, 8, 2, 7, 1 }, /* R */
238  { 0, 3, 1, 0, 8, 2, 7, 2 }, /* G */
239  { 0, 3, 2, 0, 8, 2, 7, 3 }, /* B */
240  },
241  .flags = AV_PIX_FMT_FLAG_RGB,
242  },
243  [AV_PIX_FMT_BGR24] = {
244  .name = "bgr24",
245  .nb_components = 3,
246  .log2_chroma_w = 0,
247  .log2_chroma_h = 0,
248  .comp = {
249  { 0, 3, 2, 0, 8, 2, 7, 3 }, /* R */
250  { 0, 3, 1, 0, 8, 2, 7, 2 }, /* G */
251  { 0, 3, 0, 0, 8, 2, 7, 1 }, /* B */
252  },
253  .flags = AV_PIX_FMT_FLAG_RGB,
254  },
255  [AV_PIX_FMT_YUV422P] = {
256  .name = "yuv422p",
257  .nb_components = 3,
258  .log2_chroma_w = 1,
259  .log2_chroma_h = 0,
260  .comp = {
261  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
262  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
263  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
264  },
265  .flags = AV_PIX_FMT_FLAG_PLANAR,
266  },
267  [AV_PIX_FMT_YUV444P] = {
268  .name = "yuv444p",
269  .nb_components = 3,
270  .log2_chroma_w = 0,
271  .log2_chroma_h = 0,
272  .comp = {
273  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
274  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
275  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
276  },
277  .flags = AV_PIX_FMT_FLAG_PLANAR,
278  },
279  [AV_PIX_FMT_YUV410P] = {
280  .name = "yuv410p",
281  .nb_components = 3,
282  .log2_chroma_w = 2,
283  .log2_chroma_h = 2,
284  .comp = {
285  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
286  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
287  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
288  },
289  .flags = AV_PIX_FMT_FLAG_PLANAR,
290  },
291  [AV_PIX_FMT_YUV411P] = {
292  .name = "yuv411p",
293  .nb_components = 3,
294  .log2_chroma_w = 2,
295  .log2_chroma_h = 0,
296  .comp = {
297  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
298  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
299  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
300  },
301  .flags = AV_PIX_FMT_FLAG_PLANAR,
302  },
303  [AV_PIX_FMT_YUVJ411P] = {
304  .name = "yuvj411p",
305  .nb_components = 3,
306  .log2_chroma_w = 2,
307  .log2_chroma_h = 0,
308  .comp = {
309  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
310  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
311  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
312  },
313  .flags = AV_PIX_FMT_FLAG_PLANAR,
314  },
315  [AV_PIX_FMT_GRAY8] = {
316  .name = "gray",
317  .nb_components = 1,
318  .log2_chroma_w = 0,
319  .log2_chroma_h = 0,
320  .comp = {
321  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
322  },
323  .flags = FF_PSEUDOPAL,
324  .alias = "gray8,y8",
325  },
327  .name = "monow",
328  .nb_components = 1,
329  .log2_chroma_w = 0,
330  .log2_chroma_h = 0,
331  .comp = {
332  { 0, 1, 0, 0, 1, 0, 0, 1 }, /* Y */
333  },
334  .flags = AV_PIX_FMT_FLAG_BITSTREAM,
335  },
337  .name = "monob",
338  .nb_components = 1,
339  .log2_chroma_w = 0,
340  .log2_chroma_h = 0,
341  .comp = {
342  { 0, 1, 0, 7, 1, 0, 0, 1 }, /* Y */
343  },
344  .flags = AV_PIX_FMT_FLAG_BITSTREAM,
345  },
346  [AV_PIX_FMT_PAL8] = {
347  .name = "pal8",
348  .nb_components = 1,
349  .log2_chroma_w = 0,
350  .log2_chroma_h = 0,
351  .comp = {
352  { 0, 1, 0, 0, 8, 0, 7, 1 },
353  },
355  },
356  [AV_PIX_FMT_YUVJ420P] = {
357  .name = "yuvj420p",
358  .nb_components = 3,
359  .log2_chroma_w = 1,
360  .log2_chroma_h = 1,
361  .comp = {
362  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
363  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
364  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
365  },
366  .flags = AV_PIX_FMT_FLAG_PLANAR,
367  },
368  [AV_PIX_FMT_YUVJ422P] = {
369  .name = "yuvj422p",
370  .nb_components = 3,
371  .log2_chroma_w = 1,
372  .log2_chroma_h = 0,
373  .comp = {
374  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
375  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
376  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
377  },
378  .flags = AV_PIX_FMT_FLAG_PLANAR,
379  },
380  [AV_PIX_FMT_YUVJ444P] = {
381  .name = "yuvj444p",
382  .nb_components = 3,
383  .log2_chroma_w = 0,
384  .log2_chroma_h = 0,
385  .comp = {
386  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
387  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
388  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
389  },
390  .flags = AV_PIX_FMT_FLAG_PLANAR,
391  },
392  [AV_PIX_FMT_XVMC] = {
393  .name = "xvmc",
394  .flags = AV_PIX_FMT_FLAG_HWACCEL,
395  },
396  [AV_PIX_FMT_UYVY422] = {
397  .name = "uyvy422",
398  .nb_components = 3,
399  .log2_chroma_w = 1,
400  .log2_chroma_h = 0,
401  .comp = {
402  { 0, 2, 1, 0, 8, 1, 7, 2 }, /* Y */
403  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* U */
404  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* V */
405  },
406  },
408  .name = "uyyvyy411",
409  .nb_components = 3,
410  .log2_chroma_w = 2,
411  .log2_chroma_h = 0,
412  .comp = {
413  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* Y */
414  { 0, 6, 0, 0, 8, 5, 7, 1 }, /* U */
415  { 0, 6, 3, 0, 8, 5, 7, 4 }, /* V */
416  },
417  },
418  [AV_PIX_FMT_BGR8] = {
419  .name = "bgr8",
420  .nb_components = 3,
421  .log2_chroma_w = 0,
422  .log2_chroma_h = 0,
423  .comp = {
424  { 0, 1, 0, 0, 3, 0, 2, 1 }, /* R */
425  { 0, 1, 0, 3, 3, 0, 2, 1 }, /* G */
426  { 0, 1, 0, 6, 2, 0, 1, 1 }, /* B */
427  },
429  },
430  [AV_PIX_FMT_BGR4] = {
431  .name = "bgr4",
432  .nb_components = 3,
433  .log2_chroma_w = 0,
434  .log2_chroma_h = 0,
435  .comp = {
436  { 0, 4, 3, 0, 1, 3, 0, 4 }, /* R */
437  { 0, 4, 1, 0, 2, 3, 1, 2 }, /* G */
438  { 0, 4, 0, 0, 1, 3, 0, 1 }, /* B */
439  },
441  },
443  .name = "bgr4_byte",
444  .nb_components = 3,
445  .log2_chroma_w = 0,
446  .log2_chroma_h = 0,
447  .comp = {
448  { 0, 1, 0, 0, 1, 0, 0, 1 }, /* R */
449  { 0, 1, 0, 1, 2, 0, 1, 1 }, /* G */
450  { 0, 1, 0, 3, 1, 0, 0, 1 }, /* B */
451  },
453  },
454  [AV_PIX_FMT_RGB8] = {
455  .name = "rgb8",
456  .nb_components = 3,
457  .log2_chroma_w = 0,
458  .log2_chroma_h = 0,
459  .comp = {
460  { 0, 1, 0, 6, 2, 0, 1, 1 }, /* R */
461  { 0, 1, 0, 3, 3, 0, 2, 1 }, /* G */
462  { 0, 1, 0, 0, 3, 0, 2, 1 }, /* B */
463  },
465  },
466  [AV_PIX_FMT_RGB4] = {
467  .name = "rgb4",
468  .nb_components = 3,
469  .log2_chroma_w = 0,
470  .log2_chroma_h = 0,
471  .comp = {
472  { 0, 4, 0, 0, 1, 3, 0, 1 }, /* R */
473  { 0, 4, 1, 0, 2, 3, 1, 2 }, /* G */
474  { 0, 4, 3, 0, 1, 3, 0, 4 }, /* B */
475  },
477  },
479  .name = "rgb4_byte",
480  .nb_components = 3,
481  .log2_chroma_w = 0,
482  .log2_chroma_h = 0,
483  .comp = {
484  { 0, 1, 0, 3, 1, 0, 0, 1 }, /* R */
485  { 0, 1, 0, 1, 2, 0, 1, 1 }, /* G */
486  { 0, 1, 0, 0, 1, 0, 0, 1 }, /* B */
487  },
489  },
490  [AV_PIX_FMT_NV12] = {
491  .name = "nv12",
492  .nb_components = 3,
493  .log2_chroma_w = 1,
494  .log2_chroma_h = 1,
495  .comp = {
496  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
497  { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */
498  { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */
499  },
500  .flags = AV_PIX_FMT_FLAG_PLANAR,
501  },
502  [AV_PIX_FMT_NV21] = {
503  .name = "nv21",
504  .nb_components = 3,
505  .log2_chroma_w = 1,
506  .log2_chroma_h = 1,
507  .comp = {
508  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
509  { 1, 2, 1, 0, 8, 1, 7, 2 }, /* U */
510  { 1, 2, 0, 0, 8, 1, 7, 1 }, /* V */
511  },
512  .flags = AV_PIX_FMT_FLAG_PLANAR,
513  },
514  [AV_PIX_FMT_ARGB] = {
515  .name = "argb",
516  .nb_components = 4,
517  .log2_chroma_w = 0,
518  .log2_chroma_h = 0,
519  .comp = {
520  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* R */
521  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */
522  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* B */
523  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* A */
524  },
526  },
527  [AV_PIX_FMT_RGBA] = {
528  .name = "rgba",
529  .nb_components = 4,
530  .log2_chroma_w = 0,
531  .log2_chroma_h = 0,
532  .comp = {
533  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* R */
534  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */
535  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* B */
536  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* A */
537  },
539  },
540  [AV_PIX_FMT_ABGR] = {
541  .name = "abgr",
542  .nb_components = 4,
543  .log2_chroma_w = 0,
544  .log2_chroma_h = 0,
545  .comp = {
546  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* R */
547  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */
548  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* B */
549  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* A */
550  },
552  },
553  [AV_PIX_FMT_BGRA] = {
554  .name = "bgra",
555  .nb_components = 4,
556  .log2_chroma_w = 0,
557  .log2_chroma_h = 0,
558  .comp = {
559  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* R */
560  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */
561  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* B */
562  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* A */
563  },
565  },
566  [AV_PIX_FMT_0RGB] = {
567  .name = "0rgb",
568  .nb_components= 3,
569  .log2_chroma_w= 0,
570  .log2_chroma_h= 0,
571  .comp = {
572  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* R */
573  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */
574  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* B */
575  },
576  .flags = AV_PIX_FMT_FLAG_RGB,
577  },
578  [AV_PIX_FMT_RGB0] = {
579  .name = "rgb0",
580  .nb_components= 3,
581  .log2_chroma_w= 0,
582  .log2_chroma_h= 0,
583  .comp = {
584  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* R */
585  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */
586  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* B */
587  },
588  .flags = AV_PIX_FMT_FLAG_RGB,
589  },
590  [AV_PIX_FMT_0BGR] = {
591  .name = "0bgr",
592  .nb_components= 3,
593  .log2_chroma_w= 0,
594  .log2_chroma_h= 0,
595  .comp = {
596  { 0, 4, 3, 0, 8, 3, 7, 4 }, /* R */
597  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* G */
598  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* B */
599  },
600  .flags = AV_PIX_FMT_FLAG_RGB,
601  },
602  [AV_PIX_FMT_BGR0] = {
603  .name = "bgr0",
604  .nb_components= 3,
605  .log2_chroma_w= 0,
606  .log2_chroma_h= 0,
607  .comp = {
608  { 0, 4, 2, 0, 8, 3, 7, 3 }, /* R */
609  { 0, 4, 1, 0, 8, 3, 7, 2 }, /* G */
610  { 0, 4, 0, 0, 8, 3, 7, 1 }, /* B */
611  },
612  .flags = AV_PIX_FMT_FLAG_RGB,
613  },
614  [AV_PIX_FMT_GRAY9BE] = {
615  .name = "gray9be",
616  .nb_components = 1,
617  .log2_chroma_w = 0,
618  .log2_chroma_h = 0,
619  .comp = {
620  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
621  },
622  .flags = AV_PIX_FMT_FLAG_BE,
623  .alias = "y9be",
624  },
625  [AV_PIX_FMT_GRAY9LE] = {
626  .name = "gray9le",
627  .nb_components = 1,
628  .log2_chroma_w = 0,
629  .log2_chroma_h = 0,
630  .comp = {
631  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
632  },
633  .alias = "y9le",
634  },
635  [AV_PIX_FMT_GRAY10BE] = {
636  .name = "gray10be",
637  .nb_components = 1,
638  .log2_chroma_w = 0,
639  .log2_chroma_h = 0,
640  .comp = {
641  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
642  },
643  .flags = AV_PIX_FMT_FLAG_BE,
644  .alias = "y10be",
645  },
646  [AV_PIX_FMT_GRAY10LE] = {
647  .name = "gray10le",
648  .nb_components = 1,
649  .log2_chroma_w = 0,
650  .log2_chroma_h = 0,
651  .comp = {
652  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
653  },
654  .alias = "y10le",
655  },
656  [AV_PIX_FMT_GRAY12BE] = {
657  .name = "gray12be",
658  .nb_components = 1,
659  .log2_chroma_w = 0,
660  .log2_chroma_h = 0,
661  .comp = {
662  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
663  },
664  .flags = AV_PIX_FMT_FLAG_BE,
665  .alias = "y12be",
666  },
667  [AV_PIX_FMT_GRAY12LE] = {
668  .name = "gray12le",
669  .nb_components = 1,
670  .log2_chroma_w = 0,
671  .log2_chroma_h = 0,
672  .comp = {
673  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
674  },
675  .alias = "y12le",
676  },
677  [AV_PIX_FMT_GRAY14BE] = {
678  .name = "gray14be",
679  .nb_components = 1,
680  .log2_chroma_w = 0,
681  .log2_chroma_h = 0,
682  .comp = {
683  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
684  },
685  .flags = AV_PIX_FMT_FLAG_BE,
686  .alias = "y14be",
687  },
688  [AV_PIX_FMT_GRAY14LE] = {
689  .name = "gray14le",
690  .nb_components = 1,
691  .log2_chroma_w = 0,
692  .log2_chroma_h = 0,
693  .comp = {
694  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
695  },
696  .alias = "y14le",
697  },
698  [AV_PIX_FMT_GRAY16BE] = {
699  .name = "gray16be",
700  .nb_components = 1,
701  .log2_chroma_w = 0,
702  .log2_chroma_h = 0,
703  .comp = {
704  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
705  },
706  .flags = AV_PIX_FMT_FLAG_BE,
707  .alias = "y16be",
708  },
709  [AV_PIX_FMT_GRAY16LE] = {
710  .name = "gray16le",
711  .nb_components = 1,
712  .log2_chroma_w = 0,
713  .log2_chroma_h = 0,
714  .comp = {
715  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
716  },
717  .alias = "y16le",
718  },
719  [AV_PIX_FMT_YUV440P] = {
720  .name = "yuv440p",
721  .nb_components = 3,
722  .log2_chroma_w = 0,
723  .log2_chroma_h = 1,
724  .comp = {
725  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
726  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
727  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
728  },
729  .flags = AV_PIX_FMT_FLAG_PLANAR,
730  },
731  [AV_PIX_FMT_YUVJ440P] = {
732  .name = "yuvj440p",
733  .nb_components = 3,
734  .log2_chroma_w = 0,
735  .log2_chroma_h = 1,
736  .comp = {
737  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
738  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
739  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
740  },
741  .flags = AV_PIX_FMT_FLAG_PLANAR,
742  },
744  .name = "yuv440p10le",
745  .nb_components = 3,
746  .log2_chroma_w = 0,
747  .log2_chroma_h = 1,
748  .comp = {
749  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
750  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
751  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
752  },
753  .flags = AV_PIX_FMT_FLAG_PLANAR,
754  },
756  .name = "yuv440p10be",
757  .nb_components = 3,
758  .log2_chroma_w = 0,
759  .log2_chroma_h = 1,
760  .comp = {
761  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
762  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
763  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
764  },
766  },
768  .name = "yuv440p12le",
769  .nb_components = 3,
770  .log2_chroma_w = 0,
771  .log2_chroma_h = 1,
772  .comp = {
773  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
774  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
775  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
776  },
777  .flags = AV_PIX_FMT_FLAG_PLANAR,
778  },
780  .name = "yuv440p12be",
781  .nb_components = 3,
782  .log2_chroma_w = 0,
783  .log2_chroma_h = 1,
784  .comp = {
785  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
786  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
787  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
788  },
790  },
791  [AV_PIX_FMT_YUVA420P] = {
792  .name = "yuva420p",
793  .nb_components = 4,
794  .log2_chroma_w = 1,
795  .log2_chroma_h = 1,
796  .comp = {
797  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
798  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
799  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
800  { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */
801  },
803  },
804  [AV_PIX_FMT_YUVA422P] = {
805  .name = "yuva422p",
806  .nb_components = 4,
807  .log2_chroma_w = 1,
808  .log2_chroma_h = 0,
809  .comp = {
810  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
811  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
812  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
813  { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */
814  },
816  },
817  [AV_PIX_FMT_YUVA444P] = {
818  .name = "yuva444p",
819  .nb_components = 4,
820  .log2_chroma_w = 0,
821  .log2_chroma_h = 0,
822  .comp = {
823  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
824  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
825  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
826  { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */
827  },
829  },
831  .name = "yuva420p9be",
832  .nb_components = 4,
833  .log2_chroma_w = 1,
834  .log2_chroma_h = 1,
835  .comp = {
836  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
837  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
838  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
839  { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */
840  },
842  },
844  .name = "yuva420p9le",
845  .nb_components = 4,
846  .log2_chroma_w = 1,
847  .log2_chroma_h = 1,
848  .comp = {
849  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
850  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
851  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
852  { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */
853  },
855  },
857  .name = "yuva422p9be",
858  .nb_components = 4,
859  .log2_chroma_w = 1,
860  .log2_chroma_h = 0,
861  .comp = {
862  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
863  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
864  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
865  { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */
866  },
868  },
870  .name = "yuva422p9le",
871  .nb_components = 4,
872  .log2_chroma_w = 1,
873  .log2_chroma_h = 0,
874  .comp = {
875  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
876  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
877  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
878  { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */
879  },
881  },
883  .name = "yuva444p9be",
884  .nb_components = 4,
885  .log2_chroma_w = 0,
886  .log2_chroma_h = 0,
887  .comp = {
888  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
889  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
890  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
891  { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */
892  },
894  },
896  .name = "yuva444p9le",
897  .nb_components = 4,
898  .log2_chroma_w = 0,
899  .log2_chroma_h = 0,
900  .comp = {
901  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
902  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
903  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
904  { 3, 2, 0, 0, 9, 1, 8, 1 }, /* A */
905  },
907  },
909  .name = "yuva420p10be",
910  .nb_components = 4,
911  .log2_chroma_w = 1,
912  .log2_chroma_h = 1,
913  .comp = {
914  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
915  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
916  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
917  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
918  },
920  },
922  .name = "yuva420p10le",
923  .nb_components = 4,
924  .log2_chroma_w = 1,
925  .log2_chroma_h = 1,
926  .comp = {
927  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
928  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
929  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
930  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
931  },
933  },
935  .name = "yuva422p10be",
936  .nb_components = 4,
937  .log2_chroma_w = 1,
938  .log2_chroma_h = 0,
939  .comp = {
940  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
941  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
942  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
943  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
944  },
946  },
948  .name = "yuva422p10le",
949  .nb_components = 4,
950  .log2_chroma_w = 1,
951  .log2_chroma_h = 0,
952  .comp = {
953  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
954  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
955  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
956  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
957  },
959  },
961  .name = "yuva444p10be",
962  .nb_components = 4,
963  .log2_chroma_w = 0,
964  .log2_chroma_h = 0,
965  .comp = {
966  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
967  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
968  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
969  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
970  },
972  },
974  .name = "yuva444p10le",
975  .nb_components = 4,
976  .log2_chroma_w = 0,
977  .log2_chroma_h = 0,
978  .comp = {
979  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
980  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
981  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
982  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
983  },
985  },
987  .name = "yuva420p16be",
988  .nb_components = 4,
989  .log2_chroma_w = 1,
990  .log2_chroma_h = 1,
991  .comp = {
992  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
993  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
994  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
995  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
996  },
998  },
1000  .name = "yuva420p16le",
1001  .nb_components = 4,
1002  .log2_chroma_w = 1,
1003  .log2_chroma_h = 1,
1004  .comp = {
1005  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1006  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1007  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1008  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1009  },
1011  },
1013  .name = "yuva422p16be",
1014  .nb_components = 4,
1015  .log2_chroma_w = 1,
1016  .log2_chroma_h = 0,
1017  .comp = {
1018  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1019  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1020  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1021  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1022  },
1024  },
1026  .name = "yuva422p16le",
1027  .nb_components = 4,
1028  .log2_chroma_w = 1,
1029  .log2_chroma_h = 0,
1030  .comp = {
1031  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1032  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1033  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1034  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1035  },
1037  },
1039  .name = "yuva444p16be",
1040  .nb_components = 4,
1041  .log2_chroma_w = 0,
1042  .log2_chroma_h = 0,
1043  .comp = {
1044  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1045  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1046  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1047  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1048  },
1050  },
1052  .name = "yuva444p16le",
1053  .nb_components = 4,
1054  .log2_chroma_w = 0,
1055  .log2_chroma_h = 0,
1056  .comp = {
1057  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1058  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1059  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1060  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1061  },
1063  },
1064  [AV_PIX_FMT_RGB48BE] = {
1065  .name = "rgb48be",
1066  .nb_components = 3,
1067  .log2_chroma_w = 0,
1068  .log2_chroma_h = 0,
1069  .comp = {
1070  { 0, 6, 0, 0, 16, 5, 15, 1 }, /* R */
1071  { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */
1072  { 0, 6, 4, 0, 16, 5, 15, 5 }, /* B */
1073  },
1075  },
1076  [AV_PIX_FMT_RGB48LE] = {
1077  .name = "rgb48le",
1078  .nb_components = 3,
1079  .log2_chroma_w = 0,
1080  .log2_chroma_h = 0,
1081  .comp = {
1082  { 0, 6, 0, 0, 16, 5, 15, 1 }, /* R */
1083  { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */
1084  { 0, 6, 4, 0, 16, 5, 15, 5 }, /* B */
1085  },
1086  .flags = AV_PIX_FMT_FLAG_RGB,
1087  },
1088  [AV_PIX_FMT_RGBA64BE] = {
1089  .name = "rgba64be",
1090  .nb_components = 4,
1091  .log2_chroma_w = 0,
1092  .log2_chroma_h = 0,
1093  .comp = {
1094  { 0, 8, 0, 0, 16, 7, 15, 1 }, /* R */
1095  { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */
1096  { 0, 8, 4, 0, 16, 7, 15, 5 }, /* B */
1097  { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */
1098  },
1100  },
1101  [AV_PIX_FMT_RGBA64LE] = {
1102  .name = "rgba64le",
1103  .nb_components = 4,
1104  .log2_chroma_w = 0,
1105  .log2_chroma_h = 0,
1106  .comp = {
1107  { 0, 8, 0, 0, 16, 7, 15, 1 }, /* R */
1108  { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */
1109  { 0, 8, 4, 0, 16, 7, 15, 5 }, /* B */
1110  { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */
1111  },
1113  },
1114  [AV_PIX_FMT_RGB565BE] = {
1115  .name = "rgb565be",
1116  .nb_components = 3,
1117  .log2_chroma_w = 0,
1118  .log2_chroma_h = 0,
1119  .comp = {
1120  { 0, 2, -1, 3, 5, 1, 4, 0 }, /* R */
1121  { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */
1122  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */
1123  },
1125  },
1126  [AV_PIX_FMT_RGB565LE] = {
1127  .name = "rgb565le",
1128  .nb_components = 3,
1129  .log2_chroma_w = 0,
1130  .log2_chroma_h = 0,
1131  .comp = {
1132  { 0, 2, 1, 3, 5, 1, 4, 2 }, /* R */
1133  { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */
1134  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */
1135  },
1136  .flags = AV_PIX_FMT_FLAG_RGB,
1137  },
1138  [AV_PIX_FMT_RGB555BE] = {
1139  .name = "rgb555be",
1140  .nb_components = 3,
1141  .log2_chroma_w = 0,
1142  .log2_chroma_h = 0,
1143  .comp = {
1144  { 0, 2, -1, 2, 5, 1, 4, 0 }, /* R */
1145  { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */
1146  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */
1147  },
1149  },
1150  [AV_PIX_FMT_RGB555LE] = {
1151  .name = "rgb555le",
1152  .nb_components = 3,
1153  .log2_chroma_w = 0,
1154  .log2_chroma_h = 0,
1155  .comp = {
1156  { 0, 2, 1, 2, 5, 1, 4, 2 }, /* R */
1157  { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */
1158  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* B */
1159  },
1160  .flags = AV_PIX_FMT_FLAG_RGB,
1161  },
1162  [AV_PIX_FMT_RGB444BE] = {
1163  .name = "rgb444be",
1164  .nb_components = 3,
1165  .log2_chroma_w = 0,
1166  .log2_chroma_h = 0,
1167  .comp = {
1168  { 0, 2, -1, 0, 4, 1, 3, 0 }, /* R */
1169  { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */
1170  { 0, 2, 0, 0, 4, 1, 3, 1 }, /* B */
1171  },
1173  },
1174  [AV_PIX_FMT_RGB444LE] = {
1175  .name = "rgb444le",
1176  .nb_components = 3,
1177  .log2_chroma_w = 0,
1178  .log2_chroma_h = 0,
1179  .comp = {
1180  { 0, 2, 1, 0, 4, 1, 3, 2 }, /* R */
1181  { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */
1182  { 0, 2, 0, 0, 4, 1, 3, 1 }, /* B */
1183  },
1184  .flags = AV_PIX_FMT_FLAG_RGB,
1185  },
1186  [AV_PIX_FMT_BGR48BE] = {
1187  .name = "bgr48be",
1188  .nb_components = 3,
1189  .log2_chroma_w = 0,
1190  .log2_chroma_h = 0,
1191  .comp = {
1192  { 0, 6, 4, 0, 16, 5, 15, 5 }, /* R */
1193  { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */
1194  { 0, 6, 0, 0, 16, 5, 15, 1 }, /* B */
1195  },
1197  },
1198  [AV_PIX_FMT_BGR48LE] = {
1199  .name = "bgr48le",
1200  .nb_components = 3,
1201  .log2_chroma_w = 0,
1202  .log2_chroma_h = 0,
1203  .comp = {
1204  { 0, 6, 4, 0, 16, 5, 15, 5 }, /* R */
1205  { 0, 6, 2, 0, 16, 5, 15, 3 }, /* G */
1206  { 0, 6, 0, 0, 16, 5, 15, 1 }, /* B */
1207  },
1208  .flags = AV_PIX_FMT_FLAG_RGB,
1209  },
1210  [AV_PIX_FMT_BGRA64BE] = {
1211  .name = "bgra64be",
1212  .nb_components = 4,
1213  .log2_chroma_w = 0,
1214  .log2_chroma_h = 0,
1215  .comp = {
1216  { 0, 8, 4, 0, 16, 7, 15, 5 }, /* R */
1217  { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */
1218  { 0, 8, 0, 0, 16, 7, 15, 1 }, /* B */
1219  { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */
1220  },
1222  },
1223  [AV_PIX_FMT_BGRA64LE] = {
1224  .name = "bgra64le",
1225  .nb_components = 4,
1226  .log2_chroma_w = 0,
1227  .log2_chroma_h = 0,
1228  .comp = {
1229  { 0, 8, 4, 0, 16, 7, 15, 5 }, /* R */
1230  { 0, 8, 2, 0, 16, 7, 15, 3 }, /* G */
1231  { 0, 8, 0, 0, 16, 7, 15, 1 }, /* B */
1232  { 0, 8, 6, 0, 16, 7, 15, 7 }, /* A */
1233  },
1235  },
1236  [AV_PIX_FMT_BGR565BE] = {
1237  .name = "bgr565be",
1238  .nb_components = 3,
1239  .log2_chroma_w = 0,
1240  .log2_chroma_h = 0,
1241  .comp = {
1242  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */
1243  { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */
1244  { 0, 2, -1, 3, 5, 1, 4, 0 }, /* B */
1245  },
1247  },
1248  [AV_PIX_FMT_BGR565LE] = {
1249  .name = "bgr565le",
1250  .nb_components = 3,
1251  .log2_chroma_w = 0,
1252  .log2_chroma_h = 0,
1253  .comp = {
1254  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */
1255  { 0, 2, 0, 5, 6, 1, 5, 1 }, /* G */
1256  { 0, 2, 1, 3, 5, 1, 4, 2 }, /* B */
1257  },
1258  .flags = AV_PIX_FMT_FLAG_RGB,
1259  },
1260  [AV_PIX_FMT_BGR555BE] = {
1261  .name = "bgr555be",
1262  .nb_components = 3,
1263  .log2_chroma_w = 0,
1264  .log2_chroma_h = 0,
1265  .comp = {
1266  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */
1267  { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */
1268  { 0, 2, -1, 2, 5, 1, 4, 0 }, /* B */
1269  },
1271  },
1272  [AV_PIX_FMT_BGR555LE] = {
1273  .name = "bgr555le",
1274  .nb_components = 3,
1275  .log2_chroma_w = 0,
1276  .log2_chroma_h = 0,
1277  .comp = {
1278  { 0, 2, 0, 0, 5, 1, 4, 1 }, /* R */
1279  { 0, 2, 0, 5, 5, 1, 4, 1 }, /* G */
1280  { 0, 2, 1, 2, 5, 1, 4, 2 }, /* B */
1281  },
1282  .flags = AV_PIX_FMT_FLAG_RGB,
1283  },
1284  [AV_PIX_FMT_BGR444BE] = {
1285  .name = "bgr444be",
1286  .nb_components = 3,
1287  .log2_chroma_w = 0,
1288  .log2_chroma_h = 0,
1289  .comp = {
1290  { 0, 2, 0, 0, 4, 1, 3, 1 }, /* R */
1291  { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */
1292  { 0, 2, -1, 0, 4, 1, 3, 0 }, /* B */
1293  },
1295  },
1296  [AV_PIX_FMT_BGR444LE] = {
1297  .name = "bgr444le",
1298  .nb_components = 3,
1299  .log2_chroma_w = 0,
1300  .log2_chroma_h = 0,
1301  .comp = {
1302  { 0, 2, 0, 0, 4, 1, 3, 1 }, /* R */
1303  { 0, 2, 0, 4, 4, 1, 3, 1 }, /* G */
1304  { 0, 2, 1, 0, 4, 1, 3, 2 }, /* B */
1305  },
1306  .flags = AV_PIX_FMT_FLAG_RGB,
1307  },
1308 #if FF_API_VAAPI
1309  [AV_PIX_FMT_VAAPI_MOCO] = {
1310  .name = "vaapi_moco",
1311  .log2_chroma_w = 1,
1312  .log2_chroma_h = 1,
1313  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1314  },
1315  [AV_PIX_FMT_VAAPI_IDCT] = {
1316  .name = "vaapi_idct",
1317  .log2_chroma_w = 1,
1318  .log2_chroma_h = 1,
1319  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1320  },
1321  [AV_PIX_FMT_VAAPI_VLD] = {
1322  .name = "vaapi_vld",
1323  .log2_chroma_w = 1,
1324  .log2_chroma_h = 1,
1325  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1326  },
1327 #else
1328  [AV_PIX_FMT_VAAPI] = {
1329  .name = "vaapi",
1330  .log2_chroma_w = 1,
1331  .log2_chroma_h = 1,
1332  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1333  },
1334 #endif
1335  [AV_PIX_FMT_YUV420P9LE] = {
1336  .name = "yuv420p9le",
1337  .nb_components = 3,
1338  .log2_chroma_w = 1,
1339  .log2_chroma_h = 1,
1340  .comp = {
1341  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
1342  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
1343  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
1344  },
1345  .flags = AV_PIX_FMT_FLAG_PLANAR,
1346  },
1347  [AV_PIX_FMT_YUV420P9BE] = {
1348  .name = "yuv420p9be",
1349  .nb_components = 3,
1350  .log2_chroma_w = 1,
1351  .log2_chroma_h = 1,
1352  .comp = {
1353  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
1354  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
1355  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
1356  },
1358  },
1360  .name = "yuv420p10le",
1361  .nb_components = 3,
1362  .log2_chroma_w = 1,
1363  .log2_chroma_h = 1,
1364  .comp = {
1365  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
1366  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
1367  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
1368  },
1369  .flags = AV_PIX_FMT_FLAG_PLANAR,
1370  },
1372  .name = "yuv420p10be",
1373  .nb_components = 3,
1374  .log2_chroma_w = 1,
1375  .log2_chroma_h = 1,
1376  .comp = {
1377  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
1378  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
1379  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
1380  },
1382  },
1384  .name = "yuv420p12le",
1385  .nb_components = 3,
1386  .log2_chroma_w = 1,
1387  .log2_chroma_h = 1,
1388  .comp = {
1389  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
1390  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
1391  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
1392  },
1393  .flags = AV_PIX_FMT_FLAG_PLANAR,
1394  },
1396  .name = "yuv420p12be",
1397  .nb_components = 3,
1398  .log2_chroma_w = 1,
1399  .log2_chroma_h = 1,
1400  .comp = {
1401  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
1402  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
1403  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
1404  },
1406  },
1408  .name = "yuv420p14le",
1409  .nb_components = 3,
1410  .log2_chroma_w = 1,
1411  .log2_chroma_h = 1,
1412  .comp = {
1413  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
1414  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */
1415  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */
1416  },
1417  .flags = AV_PIX_FMT_FLAG_PLANAR,
1418  },
1420  .name = "yuv420p14be",
1421  .nb_components = 3,
1422  .log2_chroma_w = 1,
1423  .log2_chroma_h = 1,
1424  .comp = {
1425  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
1426  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */
1427  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */
1428  },
1430  },
1432  .name = "yuv420p16le",
1433  .nb_components = 3,
1434  .log2_chroma_w = 1,
1435  .log2_chroma_h = 1,
1436  .comp = {
1437  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1438  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1439  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1440  },
1441  .flags = AV_PIX_FMT_FLAG_PLANAR,
1442  },
1444  .name = "yuv420p16be",
1445  .nb_components = 3,
1446  .log2_chroma_w = 1,
1447  .log2_chroma_h = 1,
1448  .comp = {
1449  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1450  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1451  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1452  },
1454  },
1455  [AV_PIX_FMT_YUV422P9LE] = {
1456  .name = "yuv422p9le",
1457  .nb_components = 3,
1458  .log2_chroma_w = 1,
1459  .log2_chroma_h = 0,
1460  .comp = {
1461  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
1462  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
1463  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
1464  },
1465  .flags = AV_PIX_FMT_FLAG_PLANAR,
1466  },
1467  [AV_PIX_FMT_YUV422P9BE] = {
1468  .name = "yuv422p9be",
1469  .nb_components = 3,
1470  .log2_chroma_w = 1,
1471  .log2_chroma_h = 0,
1472  .comp = {
1473  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
1474  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
1475  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
1476  },
1478  },
1480  .name = "yuv422p10le",
1481  .nb_components = 3,
1482  .log2_chroma_w = 1,
1483  .log2_chroma_h = 0,
1484  .comp = {
1485  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
1486  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
1487  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
1488  },
1489  .flags = AV_PIX_FMT_FLAG_PLANAR,
1490  },
1492  .name = "yuv422p10be",
1493  .nb_components = 3,
1494  .log2_chroma_w = 1,
1495  .log2_chroma_h = 0,
1496  .comp = {
1497  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
1498  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
1499  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
1500  },
1502  },
1504  .name = "yuv422p12le",
1505  .nb_components = 3,
1506  .log2_chroma_w = 1,
1507  .log2_chroma_h = 0,
1508  .comp = {
1509  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
1510  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
1511  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
1512  },
1513  .flags = AV_PIX_FMT_FLAG_PLANAR,
1514  },
1516  .name = "yuv422p12be",
1517  .nb_components = 3,
1518  .log2_chroma_w = 1,
1519  .log2_chroma_h = 0,
1520  .comp = {
1521  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
1522  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
1523  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
1524  },
1526  },
1528  .name = "yuv422p14le",
1529  .nb_components = 3,
1530  .log2_chroma_w = 1,
1531  .log2_chroma_h = 0,
1532  .comp = {
1533  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
1534  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */
1535  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */
1536  },
1537  .flags = AV_PIX_FMT_FLAG_PLANAR,
1538  },
1540  .name = "yuv422p14be",
1541  .nb_components = 3,
1542  .log2_chroma_w = 1,
1543  .log2_chroma_h = 0,
1544  .comp = {
1545  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
1546  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */
1547  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */
1548  },
1550  },
1552  .name = "yuv422p16le",
1553  .nb_components = 3,
1554  .log2_chroma_w = 1,
1555  .log2_chroma_h = 0,
1556  .comp = {
1557  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1558  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1559  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1560  },
1561  .flags = AV_PIX_FMT_FLAG_PLANAR,
1562  },
1564  .name = "yuv422p16be",
1565  .nb_components = 3,
1566  .log2_chroma_w = 1,
1567  .log2_chroma_h = 0,
1568  .comp = {
1569  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1570  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1571  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1572  },
1574  },
1576  .name = "yuv444p16le",
1577  .nb_components = 3,
1578  .log2_chroma_w = 0,
1579  .log2_chroma_h = 0,
1580  .comp = {
1581  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1582  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1583  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1584  },
1585  .flags = AV_PIX_FMT_FLAG_PLANAR,
1586  },
1588  .name = "yuv444p16be",
1589  .nb_components = 3,
1590  .log2_chroma_w = 0,
1591  .log2_chroma_h = 0,
1592  .comp = {
1593  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
1594  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* U */
1595  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* V */
1596  },
1598  },
1600  .name = "yuv444p10le",
1601  .nb_components = 3,
1602  .log2_chroma_w = 0,
1603  .log2_chroma_h = 0,
1604  .comp = {
1605  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
1606  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
1607  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
1608  },
1609  .flags = AV_PIX_FMT_FLAG_PLANAR,
1610  },
1612  .name = "yuv444p10be",
1613  .nb_components = 3,
1614  .log2_chroma_w = 0,
1615  .log2_chroma_h = 0,
1616  .comp = {
1617  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
1618  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* U */
1619  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* V */
1620  },
1622  },
1623  [AV_PIX_FMT_YUV444P9LE] = {
1624  .name = "yuv444p9le",
1625  .nb_components = 3,
1626  .log2_chroma_w = 0,
1627  .log2_chroma_h = 0,
1628  .comp = {
1629  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
1630  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
1631  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
1632  },
1633  .flags = AV_PIX_FMT_FLAG_PLANAR,
1634  },
1635  [AV_PIX_FMT_YUV444P9BE] = {
1636  .name = "yuv444p9be",
1637  .nb_components = 3,
1638  .log2_chroma_w = 0,
1639  .log2_chroma_h = 0,
1640  .comp = {
1641  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* Y */
1642  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* U */
1643  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* V */
1644  },
1646  },
1648  .name = "yuv444p12le",
1649  .nb_components = 3,
1650  .log2_chroma_w = 0,
1651  .log2_chroma_h = 0,
1652  .comp = {
1653  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
1654  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
1655  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
1656  },
1657  .flags = AV_PIX_FMT_FLAG_PLANAR,
1658  },
1660  .name = "yuv444p12be",
1661  .nb_components = 3,
1662  .log2_chroma_w = 0,
1663  .log2_chroma_h = 0,
1664  .comp = {
1665  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
1666  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
1667  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
1668  },
1670  },
1672  .name = "yuv444p14le",
1673  .nb_components = 3,
1674  .log2_chroma_w = 0,
1675  .log2_chroma_h = 0,
1676  .comp = {
1677  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
1678  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */
1679  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */
1680  },
1681  .flags = AV_PIX_FMT_FLAG_PLANAR,
1682  },
1684  .name = "yuv444p14be",
1685  .nb_components = 3,
1686  .log2_chroma_w = 0,
1687  .log2_chroma_h = 0,
1688  .comp = {
1689  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
1690  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* U */
1691  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* V */
1692  },
1694  },
1696  .name = "d3d11va_vld",
1697  .log2_chroma_w = 1,
1698  .log2_chroma_h = 1,
1699  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1700  },
1701  [AV_PIX_FMT_DXVA2_VLD] = {
1702  .name = "dxva2_vld",
1703  .log2_chroma_w = 1,
1704  .log2_chroma_h = 1,
1705  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1706  },
1707  [AV_PIX_FMT_YA8] = {
1708  .name = "ya8",
1709  .nb_components = 2,
1710  .comp = {
1711  { 0, 2, 0, 0, 8, 1, 7, 1 }, /* Y */
1712  { 0, 2, 1, 0, 8, 1, 7, 2 }, /* A */
1713  },
1714  .flags = AV_PIX_FMT_FLAG_ALPHA,
1715  .alias = "gray8a",
1716  },
1717  [AV_PIX_FMT_YA16LE] = {
1718  .name = "ya16le",
1719  .nb_components = 2,
1720  .comp = {
1721  { 0, 4, 0, 0, 16, 3, 15, 1 }, /* Y */
1722  { 0, 4, 2, 0, 16, 3, 15, 3 }, /* A */
1723  },
1724  .flags = AV_PIX_FMT_FLAG_ALPHA,
1725  },
1726  [AV_PIX_FMT_YA16BE] = {
1727  .name = "ya16be",
1728  .nb_components = 2,
1729  .comp = {
1730  { 0, 4, 0, 0, 16, 3, 15, 1 }, /* Y */
1731  { 0, 4, 2, 0, 16, 3, 15, 3 }, /* A */
1732  },
1734  },
1736  .name = "videotoolbox_vld",
1737  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1738  },
1739  [AV_PIX_FMT_GBRP] = {
1740  .name = "gbrp",
1741  .nb_components = 3,
1742  .log2_chroma_w = 0,
1743  .log2_chroma_h = 0,
1744  .comp = {
1745  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* R */
1746  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* G */
1747  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* B */
1748  },
1750  },
1751  [AV_PIX_FMT_GBRP9LE] = {
1752  .name = "gbrp9le",
1753  .nb_components = 3,
1754  .log2_chroma_w = 0,
1755  .log2_chroma_h = 0,
1756  .comp = {
1757  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* R */
1758  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* G */
1759  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* B */
1760  },
1762  },
1763  [AV_PIX_FMT_GBRP9BE] = {
1764  .name = "gbrp9be",
1765  .nb_components = 3,
1766  .log2_chroma_w = 0,
1767  .log2_chroma_h = 0,
1768  .comp = {
1769  { 2, 2, 0, 0, 9, 1, 8, 1 }, /* R */
1770  { 0, 2, 0, 0, 9, 1, 8, 1 }, /* G */
1771  { 1, 2, 0, 0, 9, 1, 8, 1 }, /* B */
1772  },
1774  },
1775  [AV_PIX_FMT_GBRP10LE] = {
1776  .name = "gbrp10le",
1777  .nb_components = 3,
1778  .log2_chroma_w = 0,
1779  .log2_chroma_h = 0,
1780  .comp = {
1781  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */
1782  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */
1783  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */
1784  },
1786  },
1787  [AV_PIX_FMT_GBRP10BE] = {
1788  .name = "gbrp10be",
1789  .nb_components = 3,
1790  .log2_chroma_w = 0,
1791  .log2_chroma_h = 0,
1792  .comp = {
1793  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */
1794  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */
1795  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */
1796  },
1798  },
1799  [AV_PIX_FMT_GBRP12LE] = {
1800  .name = "gbrp12le",
1801  .nb_components = 3,
1802  .log2_chroma_w = 0,
1803  .log2_chroma_h = 0,
1804  .comp = {
1805  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
1806  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
1807  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
1808  },
1810  },
1811  [AV_PIX_FMT_GBRP12BE] = {
1812  .name = "gbrp12be",
1813  .nb_components = 3,
1814  .log2_chroma_w = 0,
1815  .log2_chroma_h = 0,
1816  .comp = {
1817  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
1818  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
1819  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
1820  },
1822  },
1823  [AV_PIX_FMT_GBRP14LE] = {
1824  .name = "gbrp14le",
1825  .nb_components = 3,
1826  .log2_chroma_w = 0,
1827  .log2_chroma_h = 0,
1828  .comp = {
1829  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* R */
1830  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* G */
1831  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* B */
1832  },
1834  },
1835  [AV_PIX_FMT_GBRP14BE] = {
1836  .name = "gbrp14be",
1837  .nb_components = 3,
1838  .log2_chroma_w = 0,
1839  .log2_chroma_h = 0,
1840  .comp = {
1841  { 2, 2, 0, 0, 14, 1, 13, 1 }, /* R */
1842  { 0, 2, 0, 0, 14, 1, 13, 1 }, /* G */
1843  { 1, 2, 0, 0, 14, 1, 13, 1 }, /* B */
1844  },
1846  },
1847  [AV_PIX_FMT_GBRP16LE] = {
1848  .name = "gbrp16le",
1849  .nb_components = 3,
1850  .log2_chroma_w = 0,
1851  .log2_chroma_h = 0,
1852  .comp = {
1853  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */
1854  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */
1855  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */
1856  },
1858  },
1859  [AV_PIX_FMT_GBRP16BE] = {
1860  .name = "gbrp16be",
1861  .nb_components = 3,
1862  .log2_chroma_w = 0,
1863  .log2_chroma_h = 0,
1864  .comp = {
1865  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */
1866  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */
1867  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */
1868  },
1870  },
1871  [AV_PIX_FMT_GBRAP] = {
1872  .name = "gbrap",
1873  .nb_components = 4,
1874  .log2_chroma_w = 0,
1875  .log2_chroma_h = 0,
1876  .comp = {
1877  { 2, 1, 0, 0, 8, 0, 7, 1 }, /* R */
1878  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* G */
1879  { 1, 1, 0, 0, 8, 0, 7, 1 }, /* B */
1880  { 3, 1, 0, 0, 8, 0, 7, 1 }, /* A */
1881  },
1884  },
1885  [AV_PIX_FMT_GBRAP16LE] = {
1886  .name = "gbrap16le",
1887  .nb_components = 4,
1888  .log2_chroma_w = 0,
1889  .log2_chroma_h = 0,
1890  .comp = {
1891  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */
1892  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */
1893  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */
1894  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1895  },
1898  },
1899  [AV_PIX_FMT_GBRAP16BE] = {
1900  .name = "gbrap16be",
1901  .nb_components = 4,
1902  .log2_chroma_w = 0,
1903  .log2_chroma_h = 0,
1904  .comp = {
1905  { 2, 2, 0, 0, 16, 1, 15, 1 }, /* R */
1906  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* G */
1907  { 1, 2, 0, 0, 16, 1, 15, 1 }, /* B */
1908  { 3, 2, 0, 0, 16, 1, 15, 1 }, /* A */
1909  },
1912  },
1913  [AV_PIX_FMT_VDPAU] = {
1914  .name = "vdpau",
1915  .log2_chroma_w = 1,
1916  .log2_chroma_h = 1,
1917  .flags = AV_PIX_FMT_FLAG_HWACCEL,
1918  },
1919  [AV_PIX_FMT_XYZ12LE] = {
1920  .name = "xyz12le",
1921  .nb_components = 3,
1922  .log2_chroma_w = 0,
1923  .log2_chroma_h = 0,
1924  .comp = {
1925  { 0, 6, 0, 4, 12, 5, 11, 1 }, /* X */
1926  { 0, 6, 2, 4, 12, 5, 11, 3 }, /* Y */
1927  { 0, 6, 4, 4, 12, 5, 11, 5 }, /* Z */
1928  },
1929  /*.flags = -- not used*/
1930  },
1931  [AV_PIX_FMT_XYZ12BE] = {
1932  .name = "xyz12be",
1933  .nb_components = 3,
1934  .log2_chroma_w = 0,
1935  .log2_chroma_h = 0,
1936  .comp = {
1937  { 0, 6, 0, 4, 12, 5, 11, 1 }, /* X */
1938  { 0, 6, 2, 4, 12, 5, 11, 3 }, /* Y */
1939  { 0, 6, 4, 4, 12, 5, 11, 5 }, /* Z */
1940  },
1941  .flags = AV_PIX_FMT_FLAG_BE,
1942  },
1943 
1944 #define BAYER8_DESC_COMMON \
1945  .nb_components= 3, \
1946  .log2_chroma_w= 0, \
1947  .log2_chroma_h= 0, \
1948  .comp = { \
1949  {0,1,0,0,2,0,1,1},\
1950  {0,1,0,0,4,0,3,1},\
1951  {0,1,0,0,2,0,1,1},\
1952  }, \
1953 
1954 #define BAYER16_DESC_COMMON \
1955  .nb_components= 3, \
1956  .log2_chroma_w= 0, \
1957  .log2_chroma_h= 0, \
1958  .comp = { \
1959  {0,2,0,0,4,1,3,1},\
1960  {0,2,0,0,8,1,7,1},\
1961  {0,2,0,0,4,1,3,1},\
1962  }, \
1963 
1965  .name = "bayer_bggr8",
1968  },
1970  .name = "bayer_bggr16le",
1973  },
1975  .name = "bayer_bggr16be",
1978  },
1980  .name = "bayer_rggb8",
1983  },
1985  .name = "bayer_rggb16le",
1988  },
1990  .name = "bayer_rggb16be",
1993  },
1995  .name = "bayer_gbrg8",
1998  },
2000  .name = "bayer_gbrg16le",
2003  },
2005  .name = "bayer_gbrg16be",
2008  },
2010  .name = "bayer_grbg8",
2013  },
2015  .name = "bayer_grbg16le",
2018  },
2020  .name = "bayer_grbg16be",
2023  },
2024  [AV_PIX_FMT_NV16] = {
2025  .name = "nv16",
2026  .nb_components = 3,
2027  .log2_chroma_w = 1,
2028  .log2_chroma_h = 0,
2029  .comp = {
2030  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
2031  { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */
2032  { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */
2033  },
2034  .flags = AV_PIX_FMT_FLAG_PLANAR,
2035  },
2036  [AV_PIX_FMT_NV20LE] = {
2037  .name = "nv20le",
2038  .nb_components = 3,
2039  .log2_chroma_w = 1,
2040  .log2_chroma_h = 0,
2041  .comp = {
2042  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
2043  { 1, 4, 0, 0, 10, 3, 9, 1 }, /* U */
2044  { 1, 4, 2, 0, 10, 3, 9, 3 }, /* V */
2045  },
2046  .flags = AV_PIX_FMT_FLAG_PLANAR,
2047  },
2048  [AV_PIX_FMT_NV20BE] = {
2049  .name = "nv20be",
2050  .nb_components = 3,
2051  .log2_chroma_w = 1,
2052  .log2_chroma_h = 0,
2053  .comp = {
2054  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* Y */
2055  { 1, 4, 0, 0, 10, 3, 9, 1 }, /* U */
2056  { 1, 4, 2, 0, 10, 3, 9, 3 }, /* V */
2057  },
2059  },
2060  [AV_PIX_FMT_QSV] = {
2061  .name = "qsv",
2062  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2063  },
2064  [AV_PIX_FMT_MEDIACODEC] = {
2065  .name = "mediacodec",
2066  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2067  },
2068  [AV_PIX_FMT_MMAL] = {
2069  .name = "mmal",
2070  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2071  },
2072  [AV_PIX_FMT_CUDA] = {
2073  .name = "cuda",
2074  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2075  },
2076  [AV_PIX_FMT_AYUV64LE] = {
2077  .name = "ayuv64le",
2078  .nb_components = 4,
2079  .log2_chroma_w = 0,
2080  .log2_chroma_h = 0,
2081  .comp = {
2082  { 0, 8, 2, 0, 16, 7, 15, 3 }, /* Y */
2083  { 0, 8, 4, 0, 16, 7, 15, 5 }, /* U */
2084  { 0, 8, 6, 0, 16, 7, 15, 7 }, /* V */
2085  { 0, 8, 0, 0, 16, 7, 15, 1 }, /* A */
2086  },
2087  .flags = AV_PIX_FMT_FLAG_ALPHA,
2088  },
2089  [AV_PIX_FMT_AYUV64BE] = {
2090  .name = "ayuv64be",
2091  .nb_components = 4,
2092  .log2_chroma_w = 0,
2093  .log2_chroma_h = 0,
2094  .comp = {
2095  { 0, 8, 2, 0, 16, 7, 15, 3 }, /* Y */
2096  { 0, 8, 4, 0, 16, 7, 15, 5 }, /* U */
2097  { 0, 8, 6, 0, 16, 7, 15, 7 }, /* V */
2098  { 0, 8, 0, 0, 16, 7, 15, 1 }, /* A */
2099  },
2101  },
2102  [AV_PIX_FMT_P010LE] = {
2103  .name = "p010le",
2104  .nb_components = 3,
2105  .log2_chroma_w = 1,
2106  .log2_chroma_h = 1,
2107  .comp = {
2108  { 0, 2, 0, 6, 10, 1, 9, 1 }, /* Y */
2109  { 1, 4, 0, 6, 10, 3, 9, 1 }, /* U */
2110  { 1, 4, 2, 6, 10, 3, 9, 3 }, /* V */
2111  },
2112  .flags = AV_PIX_FMT_FLAG_PLANAR,
2113  },
2114  [AV_PIX_FMT_P010BE] = {
2115  .name = "p010be",
2116  .nb_components = 3,
2117  .log2_chroma_w = 1,
2118  .log2_chroma_h = 1,
2119  .comp = {
2120  { 0, 2, 0, 6, 10, 1, 9, 1 }, /* Y */
2121  { 1, 4, 0, 6, 10, 3, 9, 1 }, /* U */
2122  { 1, 4, 2, 6, 10, 3, 9, 3 }, /* V */
2123  },
2125  },
2126  [AV_PIX_FMT_P016LE] = {
2127  .name = "p016le",
2128  .nb_components = 3,
2129  .log2_chroma_w = 1,
2130  .log2_chroma_h = 1,
2131  .comp = {
2132  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
2133  { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */
2134  { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */
2135  },
2136  .flags = AV_PIX_FMT_FLAG_PLANAR,
2137  },
2138  [AV_PIX_FMT_P016BE] = {
2139  .name = "p016be",
2140  .nb_components = 3,
2141  .log2_chroma_w = 1,
2142  .log2_chroma_h = 1,
2143  .comp = {
2144  { 0, 2, 0, 0, 16, 1, 15, 1 }, /* Y */
2145  { 1, 4, 0, 0, 16, 3, 15, 1 }, /* U */
2146  { 1, 4, 2, 0, 16, 3, 15, 3 }, /* V */
2147  },
2149  },
2150  [AV_PIX_FMT_GBRAP12LE] = {
2151  .name = "gbrap12le",
2152  .nb_components = 4,
2153  .log2_chroma_w = 0,
2154  .log2_chroma_h = 0,
2155  .comp = {
2156  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
2157  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
2158  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
2159  { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */
2160  },
2163  },
2164  [AV_PIX_FMT_GBRAP12BE] = {
2165  .name = "gbrap12be",
2166  .nb_components = 4,
2167  .log2_chroma_w = 0,
2168  .log2_chroma_h = 0,
2169  .comp = {
2170  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* R */
2171  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* G */
2172  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* B */
2173  { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */
2174  },
2177  },
2178  [AV_PIX_FMT_GBRAP10LE] = {
2179  .name = "gbrap10le",
2180  .nb_components = 4,
2181  .log2_chroma_w = 0,
2182  .log2_chroma_h = 0,
2183  .comp = {
2184  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */
2185  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */
2186  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */
2187  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
2188  },
2191  },
2192  [AV_PIX_FMT_GBRAP10BE] = {
2193  .name = "gbrap10be",
2194  .nb_components = 4,
2195  .log2_chroma_w = 0,
2196  .log2_chroma_h = 0,
2197  .comp = {
2198  { 2, 2, 0, 0, 10, 1, 9, 1 }, /* R */
2199  { 0, 2, 0, 0, 10, 1, 9, 1 }, /* G */
2200  { 1, 2, 0, 0, 10, 1, 9, 1 }, /* B */
2201  { 3, 2, 0, 0, 10, 1, 9, 1 }, /* A */
2202  },
2205  },
2206  [AV_PIX_FMT_D3D11] = {
2207  .name = "d3d11",
2208  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2209  },
2210  [AV_PIX_FMT_GBRPF32BE] = {
2211  .name = "gbrpf32be",
2212  .nb_components = 3,
2213  .log2_chroma_w = 0,
2214  .log2_chroma_h = 0,
2215  .comp = {
2216  { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */
2217  { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */
2218  { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */
2219  },
2222  },
2223  [AV_PIX_FMT_GBRPF32LE] = {
2224  .name = "gbrpf32le",
2225  .nb_components = 3,
2226  .log2_chroma_w = 0,
2227  .log2_chroma_h = 0,
2228  .comp = {
2229  { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */
2230  { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */
2231  { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */
2232  },
2234  },
2235  [AV_PIX_FMT_GBRAPF32BE] = {
2236  .name = "gbrapf32be",
2237  .nb_components = 4,
2238  .log2_chroma_w = 0,
2239  .log2_chroma_h = 0,
2240  .comp = {
2241  { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */
2242  { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */
2243  { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */
2244  { 3, 4, 0, 0, 32, 3, 31, 1 }, /* A */
2245  },
2249  },
2250  [AV_PIX_FMT_GBRAPF32LE] = {
2251  .name = "gbrapf32le",
2252  .nb_components = 4,
2253  .log2_chroma_w = 0,
2254  .log2_chroma_h = 0,
2255  .comp = {
2256  { 2, 4, 0, 0, 32, 3, 31, 1 }, /* R */
2257  { 0, 4, 0, 0, 32, 3, 31, 1 }, /* G */
2258  { 1, 4, 0, 0, 32, 3, 31, 1 }, /* B */
2259  { 3, 4, 0, 0, 32, 3, 31, 1 }, /* A */
2260  },
2263  },
2264  [AV_PIX_FMT_DRM_PRIME] = {
2265  .name = "drm_prime",
2266  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2267  },
2268  [AV_PIX_FMT_OPENCL] = {
2269  .name = "opencl",
2270  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2271  },
2272  [AV_PIX_FMT_GRAYF32BE] = {
2273  .name = "grayf32be",
2274  .nb_components = 1,
2275  .log2_chroma_w = 0,
2276  .log2_chroma_h = 0,
2277  .comp = {
2278  { 0, 4, 0, 0, 32, 3, 31, 1 }, /* Y */
2279  },
2281  .alias = "yf32be",
2282  },
2283  [AV_PIX_FMT_GRAYF32LE] = {
2284  .name = "grayf32le",
2285  .nb_components = 1,
2286  .log2_chroma_w = 0,
2287  .log2_chroma_h = 0,
2288  .comp = {
2289  { 0, 4, 0, 0, 32, 3, 31, 1 }, /* Y */
2290  },
2291  .flags = AV_PIX_FMT_FLAG_FLOAT,
2292  .alias = "yf32le",
2293  },
2295  .name = "yuva422p12be",
2296  .nb_components = 4,
2297  .log2_chroma_w = 1,
2298  .log2_chroma_h = 0,
2299  .comp = {
2300  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
2301  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
2302  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
2303  { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */
2304  },
2306  },
2308  .name = "yuva422p12le",
2309  .nb_components = 4,
2310  .log2_chroma_w = 1,
2311  .log2_chroma_h = 0,
2312  .comp = {
2313  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
2314  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
2315  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
2316  { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */
2317  },
2319  },
2321  .name = "yuva444p12be",
2322  .nb_components = 4,
2323  .log2_chroma_w = 0,
2324  .log2_chroma_h = 0,
2325  .comp = {
2326  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
2327  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
2328  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
2329  { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */
2330  },
2332  },
2334  .name = "yuva444p12le",
2335  .nb_components = 4,
2336  .log2_chroma_w = 0,
2337  .log2_chroma_h = 0,
2338  .comp = {
2339  { 0, 2, 0, 0, 12, 1, 11, 1 }, /* Y */
2340  { 1, 2, 0, 0, 12, 1, 11, 1 }, /* U */
2341  { 2, 2, 0, 0, 12, 1, 11, 1 }, /* V */
2342  { 3, 2, 0, 0, 12, 1, 11, 1 }, /* A */
2343  },
2345  },
2346  [AV_PIX_FMT_NV24] = {
2347  .name = "nv24",
2348  .nb_components = 3,
2349  .log2_chroma_w = 0,
2350  .log2_chroma_h = 0,
2351  .comp = {
2352  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
2353  { 1, 2, 0, 0, 8, 1, 7, 1 }, /* U */
2354  { 1, 2, 1, 0, 8, 1, 7, 2 }, /* V */
2355  },
2356  .flags = AV_PIX_FMT_FLAG_PLANAR,
2357  },
2358  [AV_PIX_FMT_NV42] = {
2359  .name = "nv42",
2360  .nb_components = 3,
2361  .log2_chroma_w = 0,
2362  .log2_chroma_h = 0,
2363  .comp = {
2364  { 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
2365  { 1, 2, 1, 0, 8, 1, 7, 2 }, /* U */
2366  { 1, 2, 0, 0, 8, 1, 7, 1 }, /* V */
2367  },
2368  .flags = AV_PIX_FMT_FLAG_PLANAR,
2369  },
2370  [AV_PIX_FMT_VULKAN] = {
2371  .name = "vulkan",
2372  .flags = AV_PIX_FMT_FLAG_HWACCEL,
2373  },
2374 };
2375 #if FF_API_PLUS1_MINUS1
2377 #endif
2378 
2379 static const char * const color_range_names[] = {
2380  [AVCOL_RANGE_UNSPECIFIED] = "unknown",
2381  [AVCOL_RANGE_MPEG] = "tv",
2382  [AVCOL_RANGE_JPEG] = "pc",
2383 };
2384 
2385 static const char * const color_primaries_names[AVCOL_PRI_NB] = {
2386  [AVCOL_PRI_RESERVED0] = "reserved",
2387  [AVCOL_PRI_BT709] = "bt709",
2388  [AVCOL_PRI_UNSPECIFIED] = "unknown",
2389  [AVCOL_PRI_RESERVED] = "reserved",
2390  [AVCOL_PRI_BT470M] = "bt470m",
2391  [AVCOL_PRI_BT470BG] = "bt470bg",
2392  [AVCOL_PRI_SMPTE170M] = "smpte170m",
2393  [AVCOL_PRI_SMPTE240M] = "smpte240m",
2394  [AVCOL_PRI_FILM] = "film",
2395  [AVCOL_PRI_BT2020] = "bt2020",
2396  [AVCOL_PRI_SMPTE428] = "smpte428",
2397  [AVCOL_PRI_SMPTE431] = "smpte431",
2398  [AVCOL_PRI_SMPTE432] = "smpte432",
2399  [AVCOL_PRI_EBU3213] = "ebu3213",
2400 };
2401 
2402 static const char * const color_transfer_names[] = {
2403  [AVCOL_TRC_RESERVED0] = "reserved",
2404  [AVCOL_TRC_BT709] = "bt709",
2405  [AVCOL_TRC_UNSPECIFIED] = "unknown",
2406  [AVCOL_TRC_RESERVED] = "reserved",
2407  [AVCOL_TRC_GAMMA22] = "bt470m",
2408  [AVCOL_TRC_GAMMA28] = "bt470bg",
2409  [AVCOL_TRC_SMPTE170M] = "smpte170m",
2410  [AVCOL_TRC_SMPTE240M] = "smpte240m",
2411  [AVCOL_TRC_LINEAR] = "linear",
2412  [AVCOL_TRC_LOG] = "log100",
2413  [AVCOL_TRC_LOG_SQRT] = "log316",
2414  [AVCOL_TRC_IEC61966_2_4] = "iec61966-2-4",
2415  [AVCOL_TRC_BT1361_ECG] = "bt1361e",
2416  [AVCOL_TRC_IEC61966_2_1] = "iec61966-2-1",
2417  [AVCOL_TRC_BT2020_10] = "bt2020-10",
2418  [AVCOL_TRC_BT2020_12] = "bt2020-12",
2419  [AVCOL_TRC_SMPTE2084] = "smpte2084",
2420  [AVCOL_TRC_SMPTE428] = "smpte428",
2421  [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67",
2422 };
2423 
2424 static const char * const color_space_names[] = {
2425  [AVCOL_SPC_RGB] = "gbr",
2426  [AVCOL_SPC_BT709] = "bt709",
2427  [AVCOL_SPC_UNSPECIFIED] = "unknown",
2428  [AVCOL_SPC_RESERVED] = "reserved",
2429  [AVCOL_SPC_FCC] = "fcc",
2430  [AVCOL_SPC_BT470BG] = "bt470bg",
2431  [AVCOL_SPC_SMPTE170M] = "smpte170m",
2432  [AVCOL_SPC_SMPTE240M] = "smpte240m",
2433  [AVCOL_SPC_YCGCO] = "ycgco",
2434  [AVCOL_SPC_BT2020_NCL] = "bt2020nc",
2435  [AVCOL_SPC_BT2020_CL] = "bt2020c",
2436  [AVCOL_SPC_SMPTE2085] = "smpte2085",
2437  [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
2438  [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
2439  [AVCOL_SPC_ICTCP] = "ictcp",
2440 };
2441 
2442 static const char * const chroma_location_names[] = {
2443  [AVCHROMA_LOC_UNSPECIFIED] = "unspecified",
2444  [AVCHROMA_LOC_LEFT] = "left",
2445  [AVCHROMA_LOC_CENTER] = "center",
2446  [AVCHROMA_LOC_TOPLEFT] = "topleft",
2447  [AVCHROMA_LOC_TOP] = "top",
2448  [AVCHROMA_LOC_BOTTOMLEFT] = "bottomleft",
2449  [AVCHROMA_LOC_BOTTOM] = "bottom",
2450 };
2451 
2452 static enum AVPixelFormat get_pix_fmt_internal(const char *name)
2453 {
2454  enum AVPixelFormat pix_fmt;
2455 
2456  for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
2458  (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
2460  return pix_fmt;
2461 
2462  return AV_PIX_FMT_NONE;
2463 }
2464 
2466 {
2467  return (unsigned)pix_fmt < AV_PIX_FMT_NB ?
2469 }
2470 
2471 #if HAVE_BIGENDIAN
2472 # define X_NE(be, le) be
2473 #else
2474 # define X_NE(be, le) le
2475 #endif
2476 
2478 {
2479  enum AVPixelFormat pix_fmt;
2480 
2481  if (!strcmp(name, "rgb32"))
2482  name = X_NE("argb", "bgra");
2483  else if (!strcmp(name, "bgr32"))
2484  name = X_NE("abgr", "rgba");
2485 
2487  if (pix_fmt == AV_PIX_FMT_NONE) {
2488  char name2[32];
2489 
2490  snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le"));
2491  pix_fmt = get_pix_fmt_internal(name2);
2492  }
2493 
2494 #if FF_API_VAAPI
2495  if (pix_fmt == AV_PIX_FMT_NONE && !strcmp(name, "vaapi"))
2497 #endif
2498  return pix_fmt;
2499 }
2500 
2502 {
2503  int c, bits = 0;
2504  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2505 
2506  for (c = 0; c < pixdesc->nb_components; c++) {
2507  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2508  bits += pixdesc->comp[c].depth << s;
2509  }
2510 
2511  return bits >> log2_pixels;
2512 }
2513 
2515 {
2516  int c, bits = 0;
2517  int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
2518  int steps[4] = {0};
2519 
2520  for (c = 0; c < pixdesc->nb_components; c++) {
2521  const AVComponentDescriptor *comp = &pixdesc->comp[c];
2522  int s = c == 1 || c == 2 ? 0 : log2_pixels;
2523  steps[comp->plane] = comp->step << s;
2524  }
2525  for (c = 0; c < 4; c++)
2526  bits += steps[c];
2527 
2528  if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM))
2529  bits *= 8;
2530 
2531  return bits >> log2_pixels;
2532 }
2533 
2534 char *av_get_pix_fmt_string(char *buf, int buf_size,
2535  enum AVPixelFormat pix_fmt)
2536 {
2537  /* print header */
2538  if (pix_fmt < 0) {
2539  snprintf (buf, buf_size, "name" " nb_components" " nb_bits");
2540  } else {
2542  snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name,
2543  pixdesc->nb_components, av_get_bits_per_pixel(pixdesc));
2544  }
2545 
2546  return buf;
2547 }
2548 
2550 {
2551  if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
2552  return NULL;
2554 }
2555 
2557 {
2558  if (!prev)
2559  return &av_pix_fmt_descriptors[0];
2561  prev++;
2562  if (prev->name)
2563  return prev;
2564  }
2565  return NULL;
2566 }
2567 
2569 {
2570  if (desc < av_pix_fmt_descriptors ||
2572  return AV_PIX_FMT_NONE;
2573 
2574  return desc - av_pix_fmt_descriptors;
2575 }
2576 
2578  int *h_shift, int *v_shift)
2579 {
2581  if (!desc)
2582  return AVERROR(ENOSYS);
2583  *h_shift = desc->log2_chroma_w;
2584  *v_shift = desc->log2_chroma_h;
2585 
2586  return 0;
2587 }
2588 
2590 {
2592  int i, planes[4] = { 0 }, ret = 0;
2593 
2594  if (!desc)
2595  return AVERROR(EINVAL);
2596 
2597  for (i = 0; i < desc->nb_components; i++)
2598  planes[desc->comp[i].plane] = 1;
2599  for (i = 0; i < FF_ARRAY_ELEMS(planes); i++)
2600  ret += planes[i];
2601  return ret;
2602 }
2603 
2605  int i, j;
2606 
2607  for (i=0; i<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); i++) {
2609  uint8_t fill[4][8+6+3] = {{0}};
2610  uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};
2611  int linesize[4] = {0,0,0,0};
2612  uint16_t tmp[2];
2613 
2614  if (!d->name && !d->nb_components && !d->log2_chroma_w && !d->log2_chroma_h && !d->flags)
2615  continue;
2616 // av_log(NULL, AV_LOG_DEBUG, "Checking: %s\n", d->name);
2617  av_assert0(d->log2_chroma_w <= 3);
2618  av_assert0(d->log2_chroma_h <= 3);
2619  av_assert0(d->nb_components <= 4);
2620  av_assert0(d->name && d->name[0]);
2621  av_assert2(av_get_pix_fmt(d->name) == i);
2622 
2623  for (j=0; j<FF_ARRAY_ELEMS(d->comp); j++) {
2624  const AVComponentDescriptor *c = &d->comp[j];
2625  if(j>=d->nb_components) {
2626  av_assert0(!c->plane && !c->step && !c->offset && !c->shift && !c->depth);
2627  continue;
2628  }
2629  if (d->flags & AV_PIX_FMT_FLAG_BITSTREAM) {
2630  av_assert0(c->step >= c->depth);
2631  } else {
2632  av_assert0(8*c->step >= c->depth);
2633  }
2634  if (d->flags & AV_PIX_FMT_FLAG_BAYER)
2635  continue;
2636  av_read_image_line(tmp, (void*)data, linesize, d, 0, 0, j, 2, 0);
2637  av_assert0(tmp[0] == 0 && tmp[1] == 0);
2638  tmp[0] = tmp[1] = (1<<c->depth) - 1;
2639  av_write_image_line(tmp, data, linesize, d, 0, 0, j, 2);
2640  }
2641  }
2642 }
2643 
2644 
2646 {
2648  char name[16];
2649  int i;
2650 
2651  if (!desc || strlen(desc->name) < 2)
2652  return AV_PIX_FMT_NONE;
2653  av_strlcpy(name, desc->name, sizeof(name));
2654  i = strlen(name) - 2;
2655  if (strcmp(name + i, "be") && strcmp(name + i, "le"))
2656  return AV_PIX_FMT_NONE;
2657 
2658  name[i] ^= 'b' ^ 'l';
2659 
2660  return get_pix_fmt_internal(name);
2661 }
2662 
2663 #define FF_COLOR_NA -1
2664 #define FF_COLOR_RGB 0 /**< RGB color space */
2665 #define FF_COLOR_GRAY 1 /**< gray color space */
2666 #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
2667 #define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
2668 #define FF_COLOR_XYZ 4
2669 
2670 #define pixdesc_has_alpha(pixdesc) \
2671  ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
2672 
2673 
2675  if (desc->flags & AV_PIX_FMT_FLAG_PAL)
2676  return FF_COLOR_RGB;
2677 
2678  if(desc->nb_components == 1 || desc->nb_components == 2)
2679  return FF_COLOR_GRAY;
2680 
2681  if(desc->name && !strncmp(desc->name, "yuvj", 4))
2682  return FF_COLOR_YUV_JPEG;
2683 
2684  if(desc->name && !strncmp(desc->name, "xyz", 3))
2685  return FF_COLOR_XYZ;
2686 
2687  if(desc->flags & AV_PIX_FMT_FLAG_RGB)
2688  return FF_COLOR_RGB;
2689 
2690  if(desc->nb_components == 0)
2691  return FF_COLOR_NA;
2692 
2693  return FF_COLOR_YUV;
2694 }
2695 
2696 static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
2697 {
2699  int i;
2700 
2701  if (!desc || !desc->nb_components) {
2702  *min = *max = 0;
2703  return AVERROR(EINVAL);
2704  }
2705 
2706  *min = INT_MAX, *max = -INT_MAX;
2707  for (i = 0; i < desc->nb_components; i++) {
2708  *min = FFMIN(desc->comp[i].depth, *min);
2709  *max = FFMAX(desc->comp[i].depth, *max);
2710  }
2711  return 0;
2712 }
2713 
2714 static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt,
2715  enum AVPixelFormat src_pix_fmt,
2716  unsigned *lossp, unsigned consider)
2717 {
2718  const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
2719  const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
2720  int src_color, dst_color;
2721  int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
2722  int ret, loss, i, nb_components;
2723  int score = INT_MAX - 1;
2724 
2725  if (!src_desc || !dst_desc)
2726  return -4;
2727 
2728  if ((src_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) ||
2729  (dst_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) {
2730  if (dst_pix_fmt == src_pix_fmt)
2731  return -1;
2732  else
2733  return -2;
2734  }
2735 
2736  /* compute loss */
2737  *lossp = loss = 0;
2738 
2739  if (dst_pix_fmt == src_pix_fmt)
2740  return INT_MAX;
2741 
2742  if ((ret = get_pix_fmt_depth(&src_min_depth, &src_max_depth, src_pix_fmt)) < 0)
2743  return -3;
2744  if ((ret = get_pix_fmt_depth(&dst_min_depth, &dst_max_depth, dst_pix_fmt)) < 0)
2745  return -3;
2746 
2747  src_color = get_color_type(src_desc);
2748  dst_color = get_color_type(dst_desc);
2749  if (dst_pix_fmt == AV_PIX_FMT_PAL8)
2750  nb_components = FFMIN(src_desc->nb_components, 4);
2751  else
2752  nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components);
2753 
2754  for (i = 0; i < nb_components; i++) {
2755  int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1);
2756  if (src_desc->comp[i].depth - 1 > depth_minus1 && (consider & FF_LOSS_DEPTH)) {
2757  loss |= FF_LOSS_DEPTH;
2758  score -= 65536 >> depth_minus1;
2759  }
2760  }
2761 
2762  if (consider & FF_LOSS_RESOLUTION) {
2763  if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w) {
2764  loss |= FF_LOSS_RESOLUTION;
2765  score -= 256 << dst_desc->log2_chroma_w;
2766  }
2767  if (dst_desc->log2_chroma_h > src_desc->log2_chroma_h) {
2768  loss |= FF_LOSS_RESOLUTION;
2769  score -= 256 << dst_desc->log2_chroma_h;
2770  }
2771  // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side
2772  if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 &&
2773  dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) {
2774  score += 512;
2775  }
2776  }
2777 
2778  if(consider & FF_LOSS_COLORSPACE)
2779  switch(dst_color) {
2780  case FF_COLOR_RGB:
2781  if (src_color != FF_COLOR_RGB &&
2782  src_color != FF_COLOR_GRAY)
2783  loss |= FF_LOSS_COLORSPACE;
2784  break;
2785  case FF_COLOR_GRAY:
2786  if (src_color != FF_COLOR_GRAY)
2787  loss |= FF_LOSS_COLORSPACE;
2788  break;
2789  case FF_COLOR_YUV:
2790  if (src_color != FF_COLOR_YUV)
2791  loss |= FF_LOSS_COLORSPACE;
2792  break;
2793  case FF_COLOR_YUV_JPEG:
2794  if (src_color != FF_COLOR_YUV_JPEG &&
2795  src_color != FF_COLOR_YUV &&
2796  src_color != FF_COLOR_GRAY)
2797  loss |= FF_LOSS_COLORSPACE;
2798  break;
2799  default:
2800  /* fail safe test */
2801  if (src_color != dst_color)
2802  loss |= FF_LOSS_COLORSPACE;
2803  break;
2804  }
2805  if(loss & FF_LOSS_COLORSPACE)
2806  score -= (nb_components * 65536) >> FFMIN(dst_desc->comp[0].depth - 1, src_desc->comp[0].depth - 1);
2807 
2808  if (dst_color == FF_COLOR_GRAY &&
2809  src_color != FF_COLOR_GRAY && (consider & FF_LOSS_CHROMA)) {
2810  loss |= FF_LOSS_CHROMA;
2811  score -= 2 * 65536;
2812  }
2813  if (!pixdesc_has_alpha(dst_desc) && (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))) {
2814  loss |= FF_LOSS_ALPHA;
2815  score -= 65536;
2816  }
2817  if (dst_pix_fmt == AV_PIX_FMT_PAL8 && (consider & FF_LOSS_COLORQUANT) &&
2818  (src_pix_fmt != AV_PIX_FMT_PAL8 && (src_color != FF_COLOR_GRAY || (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))))) {
2819  loss |= FF_LOSS_COLORQUANT;
2820  score -= 65536;
2821  }
2822 
2823  *lossp = loss;
2824  return score;
2825 }
2826 
2827 int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
2828  enum AVPixelFormat src_pix_fmt,
2829  int has_alpha)
2830 {
2831  int loss;
2832  int ret = get_pix_fmt_score(dst_pix_fmt, src_pix_fmt, &loss, has_alpha ? ~0 : ~FF_LOSS_ALPHA);
2833  if (ret < 0)
2834  return ret;
2835  return loss;
2836 }
2837 
2838 enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
2839  enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
2840 {
2841  enum AVPixelFormat dst_pix_fmt;
2842  int loss1, loss2, loss_mask;
2843  const AVPixFmtDescriptor *desc1 = av_pix_fmt_desc_get(dst_pix_fmt1);
2844  const AVPixFmtDescriptor *desc2 = av_pix_fmt_desc_get(dst_pix_fmt2);
2845  int score1, score2;
2846 
2847  if (!desc1) {
2848  dst_pix_fmt = dst_pix_fmt2;
2849  } else if (!desc2) {
2850  dst_pix_fmt = dst_pix_fmt1;
2851  } else {
2852  loss_mask= loss_ptr?~*loss_ptr:~0; /* use loss mask if provided */
2853  if(!has_alpha)
2854  loss_mask &= ~FF_LOSS_ALPHA;
2855 
2856  score1 = get_pix_fmt_score(dst_pix_fmt1, src_pix_fmt, &loss1, loss_mask);
2857  score2 = get_pix_fmt_score(dst_pix_fmt2, src_pix_fmt, &loss2, loss_mask);
2858 
2859  if (score1 == score2) {
2861  dst_pix_fmt = av_get_padded_bits_per_pixel(desc2) < av_get_padded_bits_per_pixel(desc1) ? dst_pix_fmt2 : dst_pix_fmt1;
2862  } else {
2863  dst_pix_fmt = desc2->nb_components < desc1->nb_components ? dst_pix_fmt2 : dst_pix_fmt1;
2864  }
2865  } else {
2866  dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
2867  }
2868  }
2869 
2870  if (loss_ptr)
2871  *loss_ptr = av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha);
2872  return dst_pix_fmt;
2873 }
2874 
2875 const char *av_color_range_name(enum AVColorRange range)
2876 {
2877  return (unsigned) range < AVCOL_RANGE_NB ?
2878  color_range_names[range] : NULL;
2879 }
2880 
2882 {
2883  int i;
2884 
2885  for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) {
2886  size_t len = strlen(color_range_names[i]);
2887  if (!strncmp(color_range_names[i], name, len))
2888  return i;
2889  }
2890 
2891  return AVERROR(EINVAL);
2892 }
2893 
2894 const char *av_color_primaries_name(enum AVColorPrimaries primaries)
2895 {
2896  return (unsigned) primaries < AVCOL_PRI_NB ?
2897  color_primaries_names[primaries] : NULL;
2898 }
2899 
2901 {
2902  int i;
2903 
2904  for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) {
2905  size_t len;
2906 
2907  if (!color_primaries_names[i])
2908  continue;
2909 
2910  len = strlen(color_primaries_names[i]);
2911  if (!strncmp(color_primaries_names[i], name, len))
2912  return i;
2913  }
2914 
2915  return AVERROR(EINVAL);
2916 }
2917 
2919 {
2920  return (unsigned) transfer < AVCOL_TRC_NB ?
2921  color_transfer_names[transfer] : NULL;
2922 }
2923 
2925 {
2926  int i;
2927 
2928  for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) {
2929  size_t len;
2930 
2931  if (!color_transfer_names[i])
2932  continue;
2933 
2934  len = strlen(color_transfer_names[i]);
2935  if (!strncmp(color_transfer_names[i], name, len))
2936  return i;
2937  }
2938 
2939  return AVERROR(EINVAL);
2940 }
2941 
2943 {
2944  return (unsigned) space < AVCOL_SPC_NB ?
2946 }
2947 
2949 {
2950  int i;
2951 
2952  for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) {
2953  size_t len;
2954 
2955  if (!color_space_names[i])
2956  continue;
2957 
2958  len = strlen(color_space_names[i]);
2959  if (!strncmp(color_space_names[i], name, len))
2960  return i;
2961  }
2962 
2963  return AVERROR(EINVAL);
2964 }
2965 
2966 const char *av_chroma_location_name(enum AVChromaLocation location)
2967 {
2968  return (unsigned) location < AVCHROMA_LOC_NB ?
2969  chroma_location_names[location] : NULL;
2970 }
2971 
2973 {
2974  int i;
2975 
2976  for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) {
2977  size_t len;
2978 
2979  if (!chroma_location_names[i])
2980  continue;
2981 
2982  len = strlen(chroma_location_names[i]);
2983  if (!strncmp(chroma_location_names[i], name, len))
2984  return i;
2985  }
2986 
2987  return AVERROR(EINVAL);
2988 }
AVCOL_PRI_RESERVED
@ AVCOL_PRI_RESERVED
Definition: pixfmt.h:459
ff_check_pixfmt_descriptors
void ff_check_pixfmt_descriptors(void)
Definition: pixdesc.c:2604
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:85
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:199
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:2645
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:157
AV_PIX_FMT_CUDA
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
Definition: pixfmt.h:235
AV_PIX_FMT_GRAY10BE
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
Definition: pixfmt.h:297
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
AV_PIX_FMT_BAYER_GBRG16LE
@ AV_PIX_FMT_BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
Definition: pixfmt.h:268
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:149
AVCOL_PRI_EBU3213
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E / JEDEC P22 phosphors.
Definition: pixfmt.h:471
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_descriptors
static const FF_DISABLE_DEPRECATION_WARNINGS AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
Definition: pixdesc.c:173
AV_PIX_FMT_YA8
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
Definition: pixfmt.h:143
FF_LOSS_CHROMA
#define FF_LOSS_CHROMA
loss of chroma (e.g.
Definition: pixdesc.h:395
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:207
space
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated space
Definition: undefined.txt:4
AV_WL32
#define AV_WL32(p, v)
Definition: intreadwrite.h:426
color_range_names
static const FF_ENABLE_DEPRECATION_WARNINGS char *const color_range_names[]
Definition: pixdesc.c:2379
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:480
comp
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
Definition: eamad.c:83
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:139
AV_PIX_FMT_GBRP16BE
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
Definition: pixfmt.h:174
AV_PIX_FMT_GBRP10BE
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
Definition: pixfmt.h:172
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:2549
AVCOL_TRC_LINEAR
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
Definition: pixfmt.h:489
AVCHROMA_LOC_BOTTOM
@ AVCHROMA_LOC_BOTTOM
Definition: pixfmt.h:561
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:249
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:227
AV_PIX_FMT_FLAG_FLOAT
#define AV_PIX_FMT_FLAG_FLOAT
The pixel format contains IEEE-754 floating point values.
Definition: pixdesc.h:188
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:162
av_color_space_from_name
int av_color_space_from_name(const char *name)
Definition: pixdesc.c:2948
AVCOL_TRC_NB
@ AVCOL_TRC_NB
Not part of ABI.
Definition: pixfmt.h:502
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:26
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:188
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:205
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:278
AV_PIX_FMT_GBRAPF32LE
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
Definition: pixfmt.h:321
av_color_range_from_name
int av_color_range_from_name(const char *name)
Definition: pixdesc.c:2881
w
uint8_t w
Definition: llviddspenc.c:38
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
the normal 2^n-1 "JPEG" YUV ranges
Definition: pixfmt.h:535
AV_PIX_FMT_GBRPF32BE
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
Definition: pixfmt.h:318
AV_PIX_FMT_DRM_PRIME
@ AV_PIX_FMT_DRM_PRIME
DRM-managed buffers exposed through PRIME buffer sharing.
Definition: pixfmt.h:328
AVComponentDescriptor::depth
int depth
Number of bits in the component.
Definition: pixdesc.h:58
AVPixFmtDescriptor::name
const char * name
Definition: pixdesc.h:82
AVCOL_SPC_NB
@ AVCOL_SPC_NB
Not part of ABI.
Definition: pixfmt.h:526
AVCOL_TRC_UNSPECIFIED
@ AVCOL_TRC_UNSPECIFIED
Definition: pixfmt.h:483
data
const char data[16]
Definition: mxf.c:91
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:285
AV_PIX_FMT_MONOWHITE
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:75
av_pix_fmt_desc_next
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
Definition: pixdesc.c:2556
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:244
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:131
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:229
AVCOL_SPC_RGB
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
Definition: pixfmt.h:510
AVCOL_TRC_BT2020_12
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
Definition: pixfmt.h:496
AV_PIX_FMT_GBRP14BE
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
Definition: pixfmt.h:256
AV_PIX_FMT_BGR24
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:69
AV_PIX_FMT_BGRA
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:95
av_get_bits_per_pixel
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
Definition: pixdesc.c:2501
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:99
max
#define max(a, b)
Definition: cuda_runtime.h:33
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:2534
AVColorPrimaries
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:455
FF_COLOR_GRAY
#define FF_COLOR_GRAY
gray color space
Definition: pixdesc.c:2665
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:166
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:182
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:271
AV_PIX_FMT_GRAY10LE
@ AV_PIX_FMT_GRAY10LE
Y , 10bpp, little-endian.
Definition: pixfmt.h:298
AV_PIX_FMT_GRAYF32LE
@ AV_PIX_FMT_GRAYF32LE
IEEE-754 single precision Y, 32bpp, little-endian.
Definition: pixfmt.h:341
AVCOL_SPC_BT2020_CL
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
Definition: pixfmt.h:521
av_chroma_location_name
const char * av_chroma_location_name(enum AVChromaLocation location)
Definition: pixdesc.c:2966
AV_PIX_FMT_VULKAN
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition: pixfmt.h:356
AV_PIX_FMT_RGB555BE
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:107
AV_PIX_FMT_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:279
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:135
FF_LOSS_ALPHA
#define FF_LOSS_ALPHA
loss of alpha bits
Definition: pixdesc.h:393
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:269
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:280
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:361
AV_PIX_FMT_GBRAP12LE
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
Definition: pixfmt.h:288
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:97
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2589
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:515
av_chroma_location_from_name
int av_chroma_location_from_name(const char *name)
Definition: pixdesc.c:2972
AVCOL_SPC_RESERVED
@ AVCOL_SPC_RESERVED
Definition: pixfmt.h:513
AVCOL_TRC_IEC61966_2_1
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
Definition: pixfmt.h:494
av_color_space_name
const char * av_color_space_name(enum AVColorSpace space)
Definition: pixdesc.c:2942
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:215
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:243
AV_PIX_FMT_FLAG_HWACCEL
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
Definition: pixdesc.h:140
AV_PIX_FMT_GRAY9LE
@ AV_PIX_FMT_GRAY9LE
Y , 9bpp, little-endian.
Definition: pixfmt.h:316
AVCOL_RANGE_NB
@ AVCOL_RANGE_NB
Not part of ABI.
Definition: pixfmt.h:536
AVCOL_TRC_GAMMA28
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
Definition: pixfmt.h:486
AV_PIX_FMT_VAAPI_IDCT
@ AV_PIX_FMT_VAAPI_IDCT
HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state str...
Definition: pixfmt.h:119
av_color_transfer_from_name
int av_color_transfer_from_name(const char *name)
Definition: pixdesc.c:2924
val
static double val(void *priv, double ch)
Definition: aeval.c:76
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:2577
chroma_location_names
static const char *const chroma_location_names[]
Definition: pixdesc.c:2442
AVCOL_TRC_LOG_SQRT
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
Definition: pixfmt.h:491
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:194
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:164
AVCOL_TRC_GAMMA22
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
Definition: pixfmt.h:485
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:159
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:251
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:258
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:246
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:253
AV_PIX_FMT_BGR8
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: pixfmt.h:83
avassert.h
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:267
AVCOL_PRI_RESERVED0
@ AVCOL_PRI_RESERVED0
Definition: pixfmt.h:456
mask
static const uint16_t mask[17]
Definition: lzw.c:38
AV_PIX_FMT_YUVJ422P
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:79
AV_PIX_FMT_GBRAP16BE
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
Definition: pixfmt.h:216
intreadwrite.h
AV_PIX_FMT_DXVA2_VLD
@ AV_PIX_FMT_DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
Definition: pixfmt.h:137
s
#define s(width, name)
Definition: cbs_vp9.c:257
AV_PIX_FMT_GBRP16LE
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
Definition: pixfmt.h:175
AVCHROMA_LOC_TOP
@ AVCHROMA_LOC_TOP
Definition: pixfmt.h:559
AVCOL_PRI_NB
@ AVCOL_PRI_NB
Not part of ABI.
Definition: pixfmt.h:473
AV_PIX_FMT_YUVA420P
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:101
AVCOL_TRC_BT1361_ECG
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
Definition: pixfmt.h:493
color_space_names
static const char *const color_space_names[]
Definition: pixdesc.c:2424
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:266
AV_PIX_FMT_VAAPI_MOCO
@ AV_PIX_FMT_VAAPI_MOCO
HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_r...
Definition: pixfmt.h:118
AV_PIX_FMT_BAYER_BGGR8
@ AV_PIX_FMT_BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: pixfmt.h:260
AVCOL_SPC_SMPTE170M
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:516
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:203
AV_PIX_FMT_P016BE
@ AV_PIX_FMT_P016BE
like NV12, with 16bpp per component, big-endian
Definition: pixfmt.h:301
bits
uint8_t bits
Definition: vp3data.h:202
AV_PIX_FMT_GBRP12LE
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
Definition: pixfmt.h:255
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:37
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:190
AV_PIX_FMT_FLAG_ALPHA
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
Definition: pixdesc.h:177
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:90
AVCOL_PRI_SMPTE428
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
Definition: pixfmt.h:467
AV_PIX_FMT_RGB4
@ AV_PIX_FMT_RGB4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
Definition: pixfmt.h:87
pix_fmt
static enum AVPixelFormat pix_fmt
Definition: demuxing_decoding.c:40
AVPixFmtDescriptor::log2_chroma_w
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:92
AV_PIX_FMT_GBRP10LE
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
Definition: pixfmt.h:173
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
AVCOL_PRI_SMPTE240M
@ AVCOL_PRI_SMPTE240M
functionally identical to above
Definition: pixfmt.h:464
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:34
AVCOL_PRI_UNSPECIFIED
@ AVCOL_PRI_UNSPECIFIED
Definition: pixfmt.h:458
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:93
AV_PIX_FMT_YUVJ444P
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:80
AVCOL_SPC_CHROMA_DERIVED_CL
@ AVCOL_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
Definition: pixfmt.h:524
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:462
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:165
AV_PIX_FMT_BAYER_RGGB8
@ AV_PIX_FMT_BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
Definition: pixfmt.h:261
AV_PIX_FMT_MEDIACODEC
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
Definition: pixfmt.h:293
AVCOL_PRI_SMPTE170M
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:463
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:187
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:270
av_color_range_name
const char * av_color_range_name(enum AVColorRange range)
Definition: pixdesc.c:2875
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:162
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:160
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:133
AVCOL_TRC_RESERVED0
@ AVCOL_TRC_RESERVED0
Definition: pixfmt.h:481
AV_PIX_FMT_RGB565LE
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: pixfmt.h:106
AV_PIX_FMT_GBRAPF32BE
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
Definition: pixfmt.h:320
AV_PIX_FMT_GBRAP12BE
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
Definition: pixfmt.h:287
NULL
#define NULL
Definition: coverity.c:32
AVComponentDescriptor
Definition: pixdesc.h:31
AVPixFmtDescriptor::nb_components
uint8_t nb_components
The number of components each pixel has, (1-4)
Definition: pixdesc.h:83
AV_WB16
#define AV_WB16(p, v)
Definition: intreadwrite.h:405
AVCHROMA_LOC_LEFT
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
Definition: pixfmt.h:556
AV_PIX_FMT_YUYV422
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:67
FF_LOSS_DEPTH
#define FF_LOSS_DEPTH
loss due to color depth change
Definition: pixdesc.h:391
AVCHROMA_LOC_TOPLEFT
@ AVCHROMA_LOC_TOPLEFT
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
Definition: pixfmt.h:558
AVCOL_TRC_IEC61966_2_4
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
Definition: pixfmt.h:492
AV_PIX_FMT_RGB48LE
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:103
AV_PIX_FMT_YA16LE
@ AV_PIX_FMT_YA16LE
16 bits gray, 16 bits alpha (little-endian)
Definition: pixfmt.h:213
AV_PIX_FMT_YUVJ420P
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:78
AV_PIX_FMT_MONOBLACK
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
Definition: pixfmt.h:76
AV_PIX_FMT_YUVA422P12LE
@ AV_PIX_FMT_YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
Definition: pixfmt.h:344
AVCOL_PRI_BT709
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
Definition: pixfmt.h:457
AV_PIX_FMT_BGR565LE
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
Definition: pixfmt.h:111
AV_PIX_FMT_RGBA64LE
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:206
src
#define src
Definition: vp8dsp.c:254
FF_COLOR_YUV_JPEG
#define FF_COLOR_YUV_JPEG
YUV color space.
Definition: pixdesc.c:2667
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:345
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:183
AV_PIX_FMT_XVMC
@ AV_PIX_FMT_XVMC
XVideo Motion Acceleration via common packet passing.
Definition: pixfmt.h:273
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:359
av_color_primaries_name
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
Definition: pixdesc.c:2894
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:191
AVCOL_TRC_BT2020_10
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
Definition: pixfmt.h:495
AV_PIX_FMT_RGB8
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
Definition: pixfmt.h:86
AV_PIX_FMT_BGR0
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: pixfmt.h:240
AVCOL_SPC_YCGCO
@ AVCOL_SPC_YCGCO
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
Definition: pixfmt.h:518
AV_PIX_FMT_OPENCL
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
Definition: pixfmt.h:335
AV_PIX_FMT_BGR4
@ AV_PIX_FMT_BGR4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
Definition: pixfmt.h:84
AV_PIX_FMT_YUV440P10LE
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: pixfmt.h:275
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
AV_PIX_FMT_QSV
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
Definition: pixfmt.h:222
AV_PIX_FMT_VAAPI_VLD
@ AV_PIX_FMT_VAAPI_VLD
HW decoding through VA API, Picture.data[3] contains a VASurfaceID.
Definition: pixfmt.h:120
AV_PIX_FMT_BGR555BE
@ AV_PIX_FMT_BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
Definition: pixfmt.h:112
AV_PIX_FMT_YUVA420P9LE
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
Definition: pixfmt.h:179
pixdesc_has_alpha
#define pixdesc_has_alpha(pixdesc)
Definition: pixdesc.c:2670
AVPixFmtDescriptor::flags
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
Definition: pixdesc.h:106
AV_PIX_FMT_ABGR
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:94
AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
Definition: pixfmt.h:533
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:245
for
for(j=16;j >0;--j)
Definition: h264pred_template.c:469
AVCOL_PRI_BT2020
@ AVCOL_PRI_BT2020
ITU-R BT2020.
Definition: pixfmt.h:466
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:252
AV_PIX_FMT_BGR4_BYTE
@ AV_PIX_FMT_BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: pixfmt.h:85
AV_WB32
#define AV_WB32(p, v)
Definition: intreadwrite.h:419
AV_PIX_FMT_YUV420P9BE
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
Definition: pixfmt.h:156
get_color_type
static int get_color_type(const AVPixFmtDescriptor *desc)
Definition: pixdesc.c:2674
color_transfer_names
static const char *const color_transfer_names[]
Definition: pixdesc.c:2402
AVCOL_TRC_SMPTE2084
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
Definition: pixfmt.h:497
AVCOL_PRI_SMPTE431
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition: pixfmt.h:469
desc
const char * desc
Definition: nvenc.c:79
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
AV_PIX_FMT_YUV440P12LE
@ AV_PIX_FMT_YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: pixfmt.h:277
AVCOL_TRC_SMPTE240M
@ AVCOL_TRC_SMPTE240M
Definition: pixfmt.h:488
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:2827
AVCOL_PRI_FILM
@ AVCOL_PRI_FILM
colour filters using Illuminant C
Definition: pixfmt.h:465
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:2514
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:148
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:264
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:242
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:161
AVCOL_TRC_LOG
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
Definition: pixfmt.h:490
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:140
FFMAX
#define FFMAX(a, b)
Definition: common.h:94
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:248
AV_PIX_FMT_YA16BE
@ AV_PIX_FMT_YA16BE
16 bits gray, 16 bits alpha (big-endian)
Definition: pixfmt.h:212
AV_PIX_FMT_GRAY12LE
@ AV_PIX_FMT_GRAY12LE
Y , 12bpp, little-endian.
Definition: pixfmt.h:296
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:92
AV_PIX_FMT_GBRP9BE
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
Definition: pixfmt.h:170
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:136
AVCHROMA_LOC_UNSPECIFIED
@ AVCHROMA_LOC_UNSPECIFIED
Definition: pixfmt.h:555
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:158
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:201
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:142
FF_COLOR_RGB
#define FF_COLOR_RGB
RGB color space.
Definition: pixdesc.c:2664
AV_PIX_FMT_GBRP9LE
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
Definition: pixfmt.h:171
AV_WL16
#define AV_WL16(p, v)
Definition: intreadwrite.h:412
FFMIN
#define FFMIN(a, b)
Definition: common.h:96
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:177
AV_PIX_FMT_GBRAP10LE
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
Definition: pixfmt.h:291
AV_PIX_FMT_BGR565BE
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
Definition: pixfmt.h:110
av_pix_fmt_desc_get_id
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
Definition: pixdesc.c:2568
AV_PIX_FMT_RGB0
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: pixfmt.h:238
AV_PIX_FMT_D3D11
@ AV_PIX_FMT_D3D11
Hardware surfaces for Direct3D11.
Definition: pixfmt.h:313
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Definition: pixfmt.h:122
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:185
AVCOL_SPC_CHROMA_DERIVED_NCL
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
Definition: pixfmt.h:523
AV_PIX_FMT_FLAG_BAYER
#define AV_PIX_FMT_FLAG_BAYER
The pixel format is following a Bayer pattern.
Definition: pixdesc.h:182
AVCOL_TRC_BT709
@ AVCOL_TRC_BT709
also ITU-R BT1361
Definition: pixfmt.h:482
AVChromaLocation
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:554
AV_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:92
AV_PIX_FMT_BGRA64LE
@ AV_PIX_FMT_BGRA64LE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:208
planes
static const struct @315 planes[]
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:186
AV_PIX_FMT_VDPAU
@ AV_PIX_FMT_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
Definition: pixfmt.h:197
AVCOL_SPC_SMPTE240M
@ AVCOL_SPC_SMPTE240M
functionally identical to above
Definition: pixfmt.h:517
AV_PIX_FMT_VIDEOTOOLBOX
@ AV_PIX_FMT_VIDEOTOOLBOX
hardware decoding through Videotoolbox
Definition: pixfmt.h:282
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:346
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:180
av_assert2
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
Definition: avassert.h:64
AV_PIX_FMT_RGB555LE
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:108
AV_PIX_FMT_RGB48BE
@ AV_PIX_FMT_RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:102
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
AVCOL_SPC_BT2020_NCL
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
Definition: pixfmt.h:520
FF_COLOR_XYZ
#define FF_COLOR_XYZ
Definition: pixdesc.c:2668
internal.h
AVColorSpace
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:509
AV_PIX_FMT_GRAY9BE
@ AV_PIX_FMT_GRAY9BE
Y , 9bpp, big-endian.
Definition: pixfmt.h:315
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:348
av_color_primaries_from_name
int av_color_primaries_from_name(const char *name)
Definition: pixdesc.c:2900
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:262
color_primaries_names
static const char *const color_primaries_names[AVCOL_PRI_NB]
Definition: pixdesc.c:2385
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:202
AV_PIX_FMT_FLAG_BE
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
Definition: pixdesc.h:128
AV_PIX_FMT_YUVJ440P
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition: pixfmt.h:100
uint8_t
uint8_t
Definition: audio_convert.c:194
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:200
FF_COLOR_NA
#define FF_COLOR_NA
Definition: pixdesc.c:2663
AV_PIX_FMT_NV21
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
Definition: pixfmt.h:90
len
int len
Definition: vorbis_enc_data.h:452
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:2714
AV_PIX_FMT_RGB4_BYTE
@ AV_PIX_FMT_RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: pixfmt.h:88
AVCOL_SPC_UNSPECIFIED
@ AVCOL_SPC_UNSPECIFIED
Definition: pixfmt.h:512
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:136
FF_LOSS_COLORSPACE
#define FF_LOSS_COLORSPACE
loss due to color space conversion
Definition: pixdesc.h:392
FF_COLOR_YUV
#define FF_COLOR_YUV
YUV color space.
Definition: pixdesc.c:2666
AV_PIX_FMT_GBRPF32LE
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
Definition: pixfmt.h:319
AV_PIX_FMT_NV42
@ AV_PIX_FMT_NV42
as above, but U and V bytes are swapped
Definition: pixfmt.h:349
AVCOL_RANGE_MPEG
@ AVCOL_RANGE_MPEG
the normal 219*2^(n-8) "MPEG" YUV ranges
Definition: pixfmt.h:534
version.h
AV_PIX_FMT_GBRAP16LE
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
Definition: pixfmt.h:217
AV_PIX_FMT_PAL8
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition: pixfmt.h:77
AV_PIX_FMT_GRAY12BE
@ AV_PIX_FMT_GRAY12BE
Y , 12bpp, big-endian.
Definition: pixfmt.h:295
AV_PIX_FMT_YVYU422
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
Definition: pixfmt.h:210
AVCOL_PRI_BT470M
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: pixfmt.h:460
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:239
AV_PIX_FMT_NV12
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:89
get_pix_fmt_internal
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
Definition: pixdesc.c:2452
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:265
AV_PIX_FMT_P016LE
@ AV_PIX_FMT_P016LE
like NV12, with 16bpp per component, little-endian
Definition: pixfmt.h:300
get_pix_fmt_depth
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2696
AV_PIX_FMT_GRAYF32BE
@ AV_PIX_FMT_GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
Definition: pixfmt.h:340
AV_PIX_FMT_GBRP12BE
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
Definition: pixfmt.h:254
AV_PIX_FMT_UYVY422
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: pixfmt.h:81
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen_template.c:38
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:88
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:250
av_get_pix_fmt
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
Definition: pixdesc.c:2477
AVCOL_TRC_ARIB_STD_B67
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
Definition: pixfmt.h:501
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:2838
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:358
AVCHROMA_LOC_CENTER
@ AVCHROMA_LOC_CENTER
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
Definition: pixfmt.h:557
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AVCOL_SPC_FCC
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
Definition: pixfmt.h:514
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:163
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:350
AVPixFmtDescriptor::comp
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
Definition: pixdesc.h:117
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:144
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:487
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:184
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:71
AV_PIX_FMT_RGB565BE
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: pixfmt.h:105
AV_PIX_FMT_YUV420P16BE
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: pixfmt.h:132
X_NE
#define X_NE(be, le)
Definition: pixdesc.c:2474
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:84
shift
static int shift(int a, int b)
Definition: sonic.c:82
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:168
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:134
FF_LOSS_COLORQUANT
#define FF_LOSS_COLORQUANT
loss due to color quantization
Definition: pixdesc.h:394
AV_PIX_FMT_GRAY16LE
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
Definition: pixfmt.h:98
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
AV_PIX_FMT_P010LE
@ AV_PIX_FMT_P010LE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
Definition: pixfmt.h:284
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:189
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:81
AVCOL_TRC_RESERVED
@ AVCOL_TRC_RESERVED
Definition: pixfmt.h:484
AV_PIX_FMT_BGR555LE
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
Definition: pixfmt.h:113
AVCOL_PRI_SMPTE432
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
Definition: pixfmt.h:470
FF_LOSS_RESOLUTION
#define FF_LOSS_RESOLUTION
loss due to resolution change
Definition: pixdesc.h:390
AV_PIX_FMT_GRAY14LE
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
Definition: pixfmt.h:338
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:90
AVCOL_SPC_SMPTE2085
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
Definition: pixfmt.h:522
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:73
AV_PIX_FMT_GRAY14BE
@ AV_PIX_FMT_GRAY14BE
Y , 14bpp, big-endian.
Definition: pixfmt.h:337
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:192
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:276
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:167
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:193
AV_PIX_FMT_GBRP14LE
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
Definition: pixfmt.h:257
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
AVCHROMA_LOC_NB
@ AVCHROMA_LOC_NB
Not part of ABI.
Definition: pixfmt.h:562
AV_PIX_FMT_0RGB
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: pixfmt.h:237
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:72
av_strlcpy
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
Definition: avstring.c:83
FF_PSEUDOPAL
#define FF_PSEUDOPAL
Definition: internal.h:369
AV_PIX_FMT_GBRAP10BE
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
Definition: pixfmt.h:290
AVCOL_TRC_SMPTE428
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
Definition: pixfmt.h:499
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:195
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:101
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:343
AVCOL_SPC_BT709
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
Definition: pixfmt.h:511
AVColorRange
AVColorRange
MPEG vs JPEG YUV range.
Definition: pixfmt.h:532
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:132
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:141
AVCOL_SPC_ICTCP
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
Definition: pixfmt.h:525
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:247
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:178
av_color_transfer_name
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
Definition: pixdesc.c:2918
AVCHROMA_LOC_BOTTOMLEFT
@ AVCHROMA_LOC_BOTTOMLEFT
Definition: pixfmt.h:560
AV_PIX_FMT_BAYER_GRBG8
@ AV_PIX_FMT_BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
Definition: pixfmt.h:263
AVPixFmtDescriptor::log2_chroma_h
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition: pixdesc.h:101
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:176
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:2465
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:94
AV_PIX_FMT_UYYVYY411
@ AV_PIX_FMT_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
Definition: pixfmt.h:82
AV_PIX_FMT_BGR48BE
@ AV_PIX_FMT_BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:148
min
float min
Definition: vorbis_enc_data.h:456
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:181