37 int x,
int y,
int c,
int w,
38 int read_pal_component,
42 int plane =
comp.plane;
43 int depth =
comp.depth;
44 unsigned mask = (1ULL << depth) - 1;
48 uint16_t *dst16 = dst;
49 uint32_t *dst32 = dst;
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);
58 if (read_pal_component)
63 if (dst_element_size == 4) *dst32++ =
val;
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;
77 if (is_8bit)
val = *p;
81 if (read_pal_component)
84 if (dst_element_size == 4) *dst32++ =
val;
93 int x,
int y,
int c,
int w,
94 int read_pal_component)
104 int x,
int y,
int c,
int w,
int src_element_size)
107 int plane =
comp.plane;
108 int depth =
comp.depth;
109 int step =
comp.step;
111 const uint32_t *src32 =
src;
112 const uint16_t *src16 =
src;
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);
120 *p |= (src_element_size == 4 ? *src32++ : *src16++) <<
shift;
128 x * step +
comp.offset;
130 if (
shift + depth <= 8) {
133 *p |= ((src_element_size == 4 ? *src32++ : *src16++) <<
shift);
138 unsigned s = (src_element_size == 4 ? *src32++ : *src16++);
139 if (
shift + depth <= 16) {
165 int x,
int y,
int c,
int w)
170 #if FF_API_PLUS1_MINUS1
180 { 0, 1, 0, 0, 8, 0, 7, 1 },
181 { 1, 1, 0, 0, 8, 0, 7, 1 },
182 { 2, 1, 0, 0, 8, 0, 7, 1 },
192 { 0, 2, 0, 0, 8, 1, 7, 1 },
193 { 0, 4, 1, 0, 8, 3, 7, 2 },
194 { 0, 4, 3, 0, 8, 3, 7, 4 },
203 { 0, 2, 0, 0, 8, 1, 7, 1 },
204 { 0, 4, 3, 0, 8, 3, 7, 4 },
205 { 0, 4, 1, 0, 8, 3, 7, 2 },
214 { 0, 4, 0, 6, 10, 3, 9, 1 },
215 { 0, 8, 2, 6, 10, 7, 9, 3 },
216 { 0, 8, 6, 6, 10, 7, 9, 7 },
225 { 0, 4, 0, 6, 10, 3, 9, 1 },
226 { 0, 8, 2, 6, 10, 7, 9, 3 },
227 { 0, 8, 6, 6, 10, 7, 9, 7 },
237 { 0, 3, 0, 0, 8, 2, 7, 1 },
238 { 0, 3, 1, 0, 8, 2, 7, 2 },
239 { 0, 3, 2, 0, 8, 2, 7, 3 },
249 { 0, 3, 2, 0, 8, 2, 7, 3 },
250 { 0, 3, 1, 0, 8, 2, 7, 2 },
251 { 0, 3, 0, 0, 8, 2, 7, 1 },
261 { 0, 4, 2, 4, 10, 3, 9, 2 },
262 { 0, 4, 1, 2, 10, 3, 9, 3 },
263 { 0, 4, 0, 0, 10, 3, 9, 4 },
273 { 0, 4, 0, 4, 10, 3, 9, 2 },
274 { 0, 4, 1, 2, 10, 3, 9, 3 },
275 { 0, 4, 2, 0, 10, 3, 9, 4 },
285 { 0, 1, 0, 0, 8, 0, 7, 1 },
286 { 1, 1, 0, 0, 8, 0, 7, 1 },
287 { 2, 1, 0, 0, 8, 0, 7, 1 },
297 { 0, 1, 0, 0, 8, 0, 7, 1 },
298 { 1, 1, 0, 0, 8, 0, 7, 1 },
299 { 2, 1, 0, 0, 8, 0, 7, 1 },
309 { 0, 1, 0, 0, 8, 0, 7, 1 },
310 { 1, 1, 0, 0, 8, 0, 7, 1 },
311 { 2, 1, 0, 0, 8, 0, 7, 1 },
321 { 0, 1, 0, 0, 8, 0, 7, 1 },
322 { 1, 1, 0, 0, 8, 0, 7, 1 },
323 { 2, 1, 0, 0, 8, 0, 7, 1 },
333 { 0, 1, 0, 0, 8, 0, 7, 1 },
334 { 1, 1, 0, 0, 8, 0, 7, 1 },
335 { 2, 1, 0, 0, 8, 0, 7, 1 },
345 { 0, 1, 0, 0, 8, 0, 7, 1 },
356 { 0, 1, 0, 0, 1, 0, 0, 1 },
366 { 0, 1, 0, 7, 1, 0, 0, 1 },
376 { 0, 1, 0, 0, 8, 0, 7, 1 },
386 { 0, 1, 0, 0, 8, 0, 7, 1 },
387 { 1, 1, 0, 0, 8, 0, 7, 1 },
388 { 2, 1, 0, 0, 8, 0, 7, 1 },
398 { 0, 1, 0, 0, 8, 0, 7, 1 },
399 { 1, 1, 0, 0, 8, 0, 7, 1 },
400 { 2, 1, 0, 0, 8, 0, 7, 1 },
410 { 0, 1, 0, 0, 8, 0, 7, 1 },
411 { 1, 1, 0, 0, 8, 0, 7, 1 },
412 { 2, 1, 0, 0, 8, 0, 7, 1 },
426 { 0, 2, 1, 0, 8, 1, 7, 2 },
427 { 0, 4, 0, 0, 8, 3, 7, 1 },
428 { 0, 4, 2, 0, 8, 3, 7, 3 },
437 { 0, 4, 1, 0, 8, 3, 7, 2 },
438 { 0, 6, 0, 0, 8, 5, 7, 1 },
439 { 0, 6, 3, 0, 8, 5, 7, 4 },
448 { 0, 1, 0, 0, 3, 0, 2, 1 },
449 { 0, 1, 0, 3, 3, 0, 2, 1 },
450 { 0, 1, 0, 6, 2, 0, 1, 1 },
460 { 0, 4, 3, 0, 1, 3, 0, 4 },
461 { 0, 4, 1, 0, 2, 3, 1, 2 },
462 { 0, 4, 0, 0, 1, 3, 0, 1 },
472 { 0, 1, 0, 0, 1, 0, 0, 1 },
473 { 0, 1, 0, 1, 2, 0, 1, 1 },
474 { 0, 1, 0, 3, 1, 0, 0, 1 },
484 { 0, 1, 0, 6, 2, 0, 1, 1 },
485 { 0, 1, 0, 3, 3, 0, 2, 1 },
486 { 0, 1, 0, 0, 3, 0, 2, 1 },
496 { 0, 4, 0, 0, 1, 3, 0, 1 },
497 { 0, 4, 1, 0, 2, 3, 1, 2 },
498 { 0, 4, 3, 0, 1, 3, 0, 4 },
508 { 0, 1, 0, 3, 1, 0, 0, 1 },
509 { 0, 1, 0, 1, 2, 0, 1, 1 },
510 { 0, 1, 0, 0, 1, 0, 0, 1 },
520 { 0, 1, 0, 0, 8, 0, 7, 1 },
521 { 1, 2, 0, 0, 8, 1, 7, 1 },
522 { 1, 2, 1, 0, 8, 1, 7, 2 },
532 { 0, 1, 0, 0, 8, 0, 7, 1 },
533 { 1, 2, 1, 0, 8, 1, 7, 2 },
534 { 1, 2, 0, 0, 8, 1, 7, 1 },
544 { 0, 4, 1, 0, 8, 3, 7, 2 },
545 { 0, 4, 2, 0, 8, 3, 7, 3 },
546 { 0, 4, 3, 0, 8, 3, 7, 4 },
547 { 0, 4, 0, 0, 8, 3, 7, 1 },
557 { 0, 4, 0, 0, 8, 3, 7, 1 },
558 { 0, 4, 1, 0, 8, 3, 7, 2 },
559 { 0, 4, 2, 0, 8, 3, 7, 3 },
560 { 0, 4, 3, 0, 8, 3, 7, 4 },
570 { 0, 4, 3, 0, 8, 3, 7, 4 },
571 { 0, 4, 2, 0, 8, 3, 7, 3 },
572 { 0, 4, 1, 0, 8, 3, 7, 2 },
573 { 0, 4, 0, 0, 8, 3, 7, 1 },
583 { 0, 4, 2, 0, 8, 3, 7, 3 },
584 { 0, 4, 1, 0, 8, 3, 7, 2 },
585 { 0, 4, 0, 0, 8, 3, 7, 1 },
586 { 0, 4, 3, 0, 8, 3, 7, 4 },
596 { 0, 4, 1, 0, 8, 3, 7, 2 },
597 { 0, 4, 2, 0, 8, 3, 7, 3 },
598 { 0, 4, 3, 0, 8, 3, 7, 4 },
608 { 0, 4, 0, 0, 8, 3, 7, 1 },
609 { 0, 4, 1, 0, 8, 3, 7, 2 },
610 { 0, 4, 2, 0, 8, 3, 7, 3 },
620 { 0, 4, 3, 0, 8, 3, 7, 4 },
621 { 0, 4, 2, 0, 8, 3, 7, 3 },
622 { 0, 4, 1, 0, 8, 3, 7, 2 },
632 { 0, 4, 2, 0, 8, 3, 7, 3 },
633 { 0, 4, 1, 0, 8, 3, 7, 2 },
634 { 0, 4, 0, 0, 8, 3, 7, 1 },
644 { 0, 2, 0, 0, 9, 1, 8, 1 },
655 { 0, 2, 0, 0, 9, 1, 8, 1 },
665 { 0, 2, 0, 0, 10, 1, 9, 1 },
676 { 0, 2, 0, 0, 10, 1, 9, 1 },
686 { 0, 2, 0, 0, 12, 1, 11, 1 },
697 { 0, 2, 0, 0, 12, 1, 11, 1 },
707 { 0, 2, 0, 0, 14, 1, 13, 1 },
718 { 0, 2, 0, 0, 14, 1, 13, 1 },
728 { 0, 2, 0, 0, 16, 1, 15, 1 },
739 { 0, 2, 0, 0, 16, 1, 15, 1 },
749 { 0, 1, 0, 0, 8, 0, 7, 1 },
750 { 1, 1, 0, 0, 8, 0, 7, 1 },
751 { 2, 1, 0, 0, 8, 0, 7, 1 },
761 { 0, 1, 0, 0, 8, 0, 7, 1 },
762 { 1, 1, 0, 0, 8, 0, 7, 1 },
763 { 2, 1, 0, 0, 8, 0, 7, 1 },
768 .name =
"yuv440p10le",
773 { 0, 2, 0, 0, 10, 1, 9, 1 },
774 { 1, 2, 0, 0, 10, 1, 9, 1 },
775 { 2, 2, 0, 0, 10, 1, 9, 1 },
780 .name =
"yuv440p10be",
785 { 0, 2, 0, 0, 10, 1, 9, 1 },
786 { 1, 2, 0, 0, 10, 1, 9, 1 },
787 { 2, 2, 0, 0, 10, 1, 9, 1 },
792 .name =
"yuv440p12le",
797 { 0, 2, 0, 0, 12, 1, 11, 1 },
798 { 1, 2, 0, 0, 12, 1, 11, 1 },
799 { 2, 2, 0, 0, 12, 1, 11, 1 },
804 .name =
"yuv440p12be",
809 { 0, 2, 0, 0, 12, 1, 11, 1 },
810 { 1, 2, 0, 0, 12, 1, 11, 1 },
811 { 2, 2, 0, 0, 12, 1, 11, 1 },
821 { 0, 1, 0, 0, 8, 0, 7, 1 },
822 { 1, 1, 0, 0, 8, 0, 7, 1 },
823 { 2, 1, 0, 0, 8, 0, 7, 1 },
824 { 3, 1, 0, 0, 8, 0, 7, 1 },
834 { 0, 1, 0, 0, 8, 0, 7, 1 },
835 { 1, 1, 0, 0, 8, 0, 7, 1 },
836 { 2, 1, 0, 0, 8, 0, 7, 1 },
837 { 3, 1, 0, 0, 8, 0, 7, 1 },
847 { 0, 1, 0, 0, 8, 0, 7, 1 },
848 { 1, 1, 0, 0, 8, 0, 7, 1 },
849 { 2, 1, 0, 0, 8, 0, 7, 1 },
850 { 3, 1, 0, 0, 8, 0, 7, 1 },
855 .name =
"yuva420p9be",
860 { 0, 2, 0, 0, 9, 1, 8, 1 },
861 { 1, 2, 0, 0, 9, 1, 8, 1 },
862 { 2, 2, 0, 0, 9, 1, 8, 1 },
863 { 3, 2, 0, 0, 9, 1, 8, 1 },
868 .name =
"yuva420p9le",
873 { 0, 2, 0, 0, 9, 1, 8, 1 },
874 { 1, 2, 0, 0, 9, 1, 8, 1 },
875 { 2, 2, 0, 0, 9, 1, 8, 1 },
876 { 3, 2, 0, 0, 9, 1, 8, 1 },
881 .name =
"yuva422p9be",
886 { 0, 2, 0, 0, 9, 1, 8, 1 },
887 { 1, 2, 0, 0, 9, 1, 8, 1 },
888 { 2, 2, 0, 0, 9, 1, 8, 1 },
889 { 3, 2, 0, 0, 9, 1, 8, 1 },
894 .name =
"yuva422p9le",
899 { 0, 2, 0, 0, 9, 1, 8, 1 },
900 { 1, 2, 0, 0, 9, 1, 8, 1 },
901 { 2, 2, 0, 0, 9, 1, 8, 1 },
902 { 3, 2, 0, 0, 9, 1, 8, 1 },
907 .name =
"yuva444p9be",
912 { 0, 2, 0, 0, 9, 1, 8, 1 },
913 { 1, 2, 0, 0, 9, 1, 8, 1 },
914 { 2, 2, 0, 0, 9, 1, 8, 1 },
915 { 3, 2, 0, 0, 9, 1, 8, 1 },
920 .name =
"yuva444p9le",
925 { 0, 2, 0, 0, 9, 1, 8, 1 },
926 { 1, 2, 0, 0, 9, 1, 8, 1 },
927 { 2, 2, 0, 0, 9, 1, 8, 1 },
928 { 3, 2, 0, 0, 9, 1, 8, 1 },
933 .name =
"yuva420p10be",
938 { 0, 2, 0, 0, 10, 1, 9, 1 },
939 { 1, 2, 0, 0, 10, 1, 9, 1 },
940 { 2, 2, 0, 0, 10, 1, 9, 1 },
941 { 3, 2, 0, 0, 10, 1, 9, 1 },
946 .name =
"yuva420p10le",
951 { 0, 2, 0, 0, 10, 1, 9, 1 },
952 { 1, 2, 0, 0, 10, 1, 9, 1 },
953 { 2, 2, 0, 0, 10, 1, 9, 1 },
954 { 3, 2, 0, 0, 10, 1, 9, 1 },
959 .name =
"yuva422p10be",
964 { 0, 2, 0, 0, 10, 1, 9, 1 },
965 { 1, 2, 0, 0, 10, 1, 9, 1 },
966 { 2, 2, 0, 0, 10, 1, 9, 1 },
967 { 3, 2, 0, 0, 10, 1, 9, 1 },
972 .name =
"yuva422p10le",
977 { 0, 2, 0, 0, 10, 1, 9, 1 },
978 { 1, 2, 0, 0, 10, 1, 9, 1 },
979 { 2, 2, 0, 0, 10, 1, 9, 1 },
980 { 3, 2, 0, 0, 10, 1, 9, 1 },
985 .name =
"yuva444p10be",
990 { 0, 2, 0, 0, 10, 1, 9, 1 },
991 { 1, 2, 0, 0, 10, 1, 9, 1 },
992 { 2, 2, 0, 0, 10, 1, 9, 1 },
993 { 3, 2, 0, 0, 10, 1, 9, 1 },
998 .name =
"yuva444p10le",
1003 { 0, 2, 0, 0, 10, 1, 9, 1 },
1004 { 1, 2, 0, 0, 10, 1, 9, 1 },
1005 { 2, 2, 0, 0, 10, 1, 9, 1 },
1006 { 3, 2, 0, 0, 10, 1, 9, 1 },
1011 .name =
"yuva420p16be",
1016 { 0, 2, 0, 0, 16, 1, 15, 1 },
1017 { 1, 2, 0, 0, 16, 1, 15, 1 },
1018 { 2, 2, 0, 0, 16, 1, 15, 1 },
1019 { 3, 2, 0, 0, 16, 1, 15, 1 },
1024 .name =
"yuva420p16le",
1029 { 0, 2, 0, 0, 16, 1, 15, 1 },
1030 { 1, 2, 0, 0, 16, 1, 15, 1 },
1031 { 2, 2, 0, 0, 16, 1, 15, 1 },
1032 { 3, 2, 0, 0, 16, 1, 15, 1 },
1037 .name =
"yuva422p16be",
1042 { 0, 2, 0, 0, 16, 1, 15, 1 },
1043 { 1, 2, 0, 0, 16, 1, 15, 1 },
1044 { 2, 2, 0, 0, 16, 1, 15, 1 },
1045 { 3, 2, 0, 0, 16, 1, 15, 1 },
1050 .name =
"yuva422p16le",
1055 { 0, 2, 0, 0, 16, 1, 15, 1 },
1056 { 1, 2, 0, 0, 16, 1, 15, 1 },
1057 { 2, 2, 0, 0, 16, 1, 15, 1 },
1058 { 3, 2, 0, 0, 16, 1, 15, 1 },
1063 .name =
"yuva444p16be",
1068 { 0, 2, 0, 0, 16, 1, 15, 1 },
1069 { 1, 2, 0, 0, 16, 1, 15, 1 },
1070 { 2, 2, 0, 0, 16, 1, 15, 1 },
1071 { 3, 2, 0, 0, 16, 1, 15, 1 },
1076 .name =
"yuva444p16le",
1081 { 0, 2, 0, 0, 16, 1, 15, 1 },
1082 { 1, 2, 0, 0, 16, 1, 15, 1 },
1083 { 2, 2, 0, 0, 16, 1, 15, 1 },
1084 { 3, 2, 0, 0, 16, 1, 15, 1 },
1094 { 0, 6, 0, 0, 16, 5, 15, 1 },
1095 { 0, 6, 2, 0, 16, 5, 15, 3 },
1096 { 0, 6, 4, 0, 16, 5, 15, 5 },
1106 { 0, 6, 0, 0, 16, 5, 15, 1 },
1107 { 0, 6, 2, 0, 16, 5, 15, 3 },
1108 { 0, 6, 4, 0, 16, 5, 15, 5 },
1118 { 0, 8, 0, 0, 16, 7, 15, 1 },
1119 { 0, 8, 2, 0, 16, 7, 15, 3 },
1120 { 0, 8, 4, 0, 16, 7, 15, 5 },
1121 { 0, 8, 6, 0, 16, 7, 15, 7 },
1131 { 0, 8, 0, 0, 16, 7, 15, 1 },
1132 { 0, 8, 2, 0, 16, 7, 15, 3 },
1133 { 0, 8, 4, 0, 16, 7, 15, 5 },
1134 { 0, 8, 6, 0, 16, 7, 15, 7 },
1144 { 0, 2, -1, 3, 5, 1, 4, 0 },
1145 { 0, 2, 0, 5, 6, 1, 5, 1 },
1146 { 0, 2, 0, 0, 5, 1, 4, 1 },
1156 { 0, 2, 1, 3, 5, 1, 4, 2 },
1157 { 0, 2, 0, 5, 6, 1, 5, 1 },
1158 { 0, 2, 0, 0, 5, 1, 4, 1 },
1168 { 0, 2, -1, 2, 5, 1, 4, 0 },
1169 { 0, 2, 0, 5, 5, 1, 4, 1 },
1170 { 0, 2, 0, 0, 5, 1, 4, 1 },
1180 { 0, 2, 1, 2, 5, 1, 4, 2 },
1181 { 0, 2, 0, 5, 5, 1, 4, 1 },
1182 { 0, 2, 0, 0, 5, 1, 4, 1 },
1192 { 0, 2, -1, 0, 4, 1, 3, 0 },
1193 { 0, 2, 0, 4, 4, 1, 3, 1 },
1194 { 0, 2, 0, 0, 4, 1, 3, 1 },
1204 { 0, 2, 1, 0, 4, 1, 3, 2 },
1205 { 0, 2, 0, 4, 4, 1, 3, 1 },
1206 { 0, 2, 0, 0, 4, 1, 3, 1 },
1216 { 0, 6, 4, 0, 16, 5, 15, 5 },
1217 { 0, 6, 2, 0, 16, 5, 15, 3 },
1218 { 0, 6, 0, 0, 16, 5, 15, 1 },
1228 { 0, 6, 4, 0, 16, 5, 15, 5 },
1229 { 0, 6, 2, 0, 16, 5, 15, 3 },
1230 { 0, 6, 0, 0, 16, 5, 15, 1 },
1240 { 0, 8, 4, 0, 16, 7, 15, 5 },
1241 { 0, 8, 2, 0, 16, 7, 15, 3 },
1242 { 0, 8, 0, 0, 16, 7, 15, 1 },
1243 { 0, 8, 6, 0, 16, 7, 15, 7 },
1253 { 0, 8, 4, 0, 16, 7, 15, 5 },
1254 { 0, 8, 2, 0, 16, 7, 15, 3 },
1255 { 0, 8, 0, 0, 16, 7, 15, 1 },
1256 { 0, 8, 6, 0, 16, 7, 15, 7 },
1266 { 0, 2, 0, 0, 5, 1, 4, 1 },
1267 { 0, 2, 0, 5, 6, 1, 5, 1 },
1268 { 0, 2, -1, 3, 5, 1, 4, 0 },
1278 { 0, 2, 0, 0, 5, 1, 4, 1 },
1279 { 0, 2, 0, 5, 6, 1, 5, 1 },
1280 { 0, 2, 1, 3, 5, 1, 4, 2 },
1290 { 0, 2, 0, 0, 5, 1, 4, 1 },
1291 { 0, 2, 0, 5, 5, 1, 4, 1 },
1292 { 0, 2, -1, 2, 5, 1, 4, 0 },
1302 { 0, 2, 0, 0, 5, 1, 4, 1 },
1303 { 0, 2, 0, 5, 5, 1, 4, 1 },
1304 { 0, 2, 1, 2, 5, 1, 4, 2 },
1314 { 0, 2, 0, 0, 4, 1, 3, 1 },
1315 { 0, 2, 0, 4, 4, 1, 3, 1 },
1316 { 0, 2, -1, 0, 4, 1, 3, 0 },
1326 { 0, 2, 0, 0, 4, 1, 3, 1 },
1327 { 0, 2, 0, 4, 4, 1, 3, 1 },
1328 { 0, 2, 1, 0, 4, 1, 3, 2 },
1334 .name =
"vaapi_moco",
1340 .name =
"vaapi_idct",
1346 .name =
"vaapi_vld",
1360 .name =
"yuv420p9le",
1365 { 0, 2, 0, 0, 9, 1, 8, 1 },
1366 { 1, 2, 0, 0, 9, 1, 8, 1 },
1367 { 2, 2, 0, 0, 9, 1, 8, 1 },
1372 .name =
"yuv420p9be",
1377 { 0, 2, 0, 0, 9, 1, 8, 1 },
1378 { 1, 2, 0, 0, 9, 1, 8, 1 },
1379 { 2, 2, 0, 0, 9, 1, 8, 1 },
1384 .name =
"yuv420p10le",
1389 { 0, 2, 0, 0, 10, 1, 9, 1 },
1390 { 1, 2, 0, 0, 10, 1, 9, 1 },
1391 { 2, 2, 0, 0, 10, 1, 9, 1 },
1396 .name =
"yuv420p10be",
1401 { 0, 2, 0, 0, 10, 1, 9, 1 },
1402 { 1, 2, 0, 0, 10, 1, 9, 1 },
1403 { 2, 2, 0, 0, 10, 1, 9, 1 },
1408 .name =
"yuv420p12le",
1413 { 0, 2, 0, 0, 12, 1, 11, 1 },
1414 { 1, 2, 0, 0, 12, 1, 11, 1 },
1415 { 2, 2, 0, 0, 12, 1, 11, 1 },
1420 .name =
"yuv420p12be",
1425 { 0, 2, 0, 0, 12, 1, 11, 1 },
1426 { 1, 2, 0, 0, 12, 1, 11, 1 },
1427 { 2, 2, 0, 0, 12, 1, 11, 1 },
1432 .name =
"yuv420p14le",
1437 { 0, 2, 0, 0, 14, 1, 13, 1 },
1438 { 1, 2, 0, 0, 14, 1, 13, 1 },
1439 { 2, 2, 0, 0, 14, 1, 13, 1 },
1444 .name =
"yuv420p14be",
1449 { 0, 2, 0, 0, 14, 1, 13, 1 },
1450 { 1, 2, 0, 0, 14, 1, 13, 1 },
1451 { 2, 2, 0, 0, 14, 1, 13, 1 },
1456 .name =
"yuv420p16le",
1461 { 0, 2, 0, 0, 16, 1, 15, 1 },
1462 { 1, 2, 0, 0, 16, 1, 15, 1 },
1463 { 2, 2, 0, 0, 16, 1, 15, 1 },
1468 .name =
"yuv420p16be",
1473 { 0, 2, 0, 0, 16, 1, 15, 1 },
1474 { 1, 2, 0, 0, 16, 1, 15, 1 },
1475 { 2, 2, 0, 0, 16, 1, 15, 1 },
1480 .name =
"yuv422p9le",
1485 { 0, 2, 0, 0, 9, 1, 8, 1 },
1486 { 1, 2, 0, 0, 9, 1, 8, 1 },
1487 { 2, 2, 0, 0, 9, 1, 8, 1 },
1492 .name =
"yuv422p9be",
1497 { 0, 2, 0, 0, 9, 1, 8, 1 },
1498 { 1, 2, 0, 0, 9, 1, 8, 1 },
1499 { 2, 2, 0, 0, 9, 1, 8, 1 },
1504 .name =
"yuv422p10le",
1509 { 0, 2, 0, 0, 10, 1, 9, 1 },
1510 { 1, 2, 0, 0, 10, 1, 9, 1 },
1511 { 2, 2, 0, 0, 10, 1, 9, 1 },
1516 .name =
"yuv422p10be",
1521 { 0, 2, 0, 0, 10, 1, 9, 1 },
1522 { 1, 2, 0, 0, 10, 1, 9, 1 },
1523 { 2, 2, 0, 0, 10, 1, 9, 1 },
1528 .name =
"yuv422p12le",
1533 { 0, 2, 0, 0, 12, 1, 11, 1 },
1534 { 1, 2, 0, 0, 12, 1, 11, 1 },
1535 { 2, 2, 0, 0, 12, 1, 11, 1 },
1540 .name =
"yuv422p12be",
1545 { 0, 2, 0, 0, 12, 1, 11, 1 },
1546 { 1, 2, 0, 0, 12, 1, 11, 1 },
1547 { 2, 2, 0, 0, 12, 1, 11, 1 },
1552 .name =
"yuv422p14le",
1557 { 0, 2, 0, 0, 14, 1, 13, 1 },
1558 { 1, 2, 0, 0, 14, 1, 13, 1 },
1559 { 2, 2, 0, 0, 14, 1, 13, 1 },
1564 .name =
"yuv422p14be",
1569 { 0, 2, 0, 0, 14, 1, 13, 1 },
1570 { 1, 2, 0, 0, 14, 1, 13, 1 },
1571 { 2, 2, 0, 0, 14, 1, 13, 1 },
1576 .name =
"yuv422p16le",
1581 { 0, 2, 0, 0, 16, 1, 15, 1 },
1582 { 1, 2, 0, 0, 16, 1, 15, 1 },
1583 { 2, 2, 0, 0, 16, 1, 15, 1 },
1588 .name =
"yuv422p16be",
1593 { 0, 2, 0, 0, 16, 1, 15, 1 },
1594 { 1, 2, 0, 0, 16, 1, 15, 1 },
1595 { 2, 2, 0, 0, 16, 1, 15, 1 },
1600 .name =
"yuv444p16le",
1605 { 0, 2, 0, 0, 16, 1, 15, 1 },
1606 { 1, 2, 0, 0, 16, 1, 15, 1 },
1607 { 2, 2, 0, 0, 16, 1, 15, 1 },
1612 .name =
"yuv444p16be",
1617 { 0, 2, 0, 0, 16, 1, 15, 1 },
1618 { 1, 2, 0, 0, 16, 1, 15, 1 },
1619 { 2, 2, 0, 0, 16, 1, 15, 1 },
1624 .name =
"yuv444p10le",
1629 { 0, 2, 0, 0, 10, 1, 9, 1 },
1630 { 1, 2, 0, 0, 10, 1, 9, 1 },
1631 { 2, 2, 0, 0, 10, 1, 9, 1 },
1636 .name =
"yuv444p10be",
1641 { 0, 2, 0, 0, 10, 1, 9, 1 },
1642 { 1, 2, 0, 0, 10, 1, 9, 1 },
1643 { 2, 2, 0, 0, 10, 1, 9, 1 },
1648 .name =
"yuv444p9le",
1653 { 0, 2, 0, 0, 9, 1, 8, 1 },
1654 { 1, 2, 0, 0, 9, 1, 8, 1 },
1655 { 2, 2, 0, 0, 9, 1, 8, 1 },
1660 .name =
"yuv444p9be",
1665 { 0, 2, 0, 0, 9, 1, 8, 1 },
1666 { 1, 2, 0, 0, 9, 1, 8, 1 },
1667 { 2, 2, 0, 0, 9, 1, 8, 1 },
1672 .name =
"yuv444p12le",
1677 { 0, 2, 0, 0, 12, 1, 11, 1 },
1678 { 1, 2, 0, 0, 12, 1, 11, 1 },
1679 { 2, 2, 0, 0, 12, 1, 11, 1 },
1684 .name =
"yuv444p12be",
1689 { 0, 2, 0, 0, 12, 1, 11, 1 },
1690 { 1, 2, 0, 0, 12, 1, 11, 1 },
1691 { 2, 2, 0, 0, 12, 1, 11, 1 },
1696 .name =
"yuv444p14le",
1701 { 0, 2, 0, 0, 14, 1, 13, 1 },
1702 { 1, 2, 0, 0, 14, 1, 13, 1 },
1703 { 2, 2, 0, 0, 14, 1, 13, 1 },
1708 .name =
"yuv444p14be",
1713 { 0, 2, 0, 0, 14, 1, 13, 1 },
1714 { 1, 2, 0, 0, 14, 1, 13, 1 },
1715 { 2, 2, 0, 0, 14, 1, 13, 1 },
1720 .name =
"d3d11va_vld",
1726 .name =
"dxva2_vld",
1735 { 0, 2, 0, 0, 8, 1, 7, 1 },
1736 { 0, 2, 1, 0, 8, 1, 7, 2 },
1745 { 0, 4, 0, 0, 16, 3, 15, 1 },
1746 { 0, 4, 2, 0, 16, 3, 15, 3 },
1754 { 0, 4, 0, 0, 16, 3, 15, 1 },
1755 { 0, 4, 2, 0, 16, 3, 15, 3 },
1760 .name =
"videotoolbox_vld",
1769 { 2, 1, 0, 0, 8, 0, 7, 1 },
1770 { 0, 1, 0, 0, 8, 0, 7, 1 },
1771 { 1, 1, 0, 0, 8, 0, 7, 1 },
1781 { 2, 2, 0, 0, 9, 1, 8, 1 },
1782 { 0, 2, 0, 0, 9, 1, 8, 1 },
1783 { 1, 2, 0, 0, 9, 1, 8, 1 },
1793 { 2, 2, 0, 0, 9, 1, 8, 1 },
1794 { 0, 2, 0, 0, 9, 1, 8, 1 },
1795 { 1, 2, 0, 0, 9, 1, 8, 1 },
1805 { 2, 2, 0, 0, 10, 1, 9, 1 },
1806 { 0, 2, 0, 0, 10, 1, 9, 1 },
1807 { 1, 2, 0, 0, 10, 1, 9, 1 },
1817 { 2, 2, 0, 0, 10, 1, 9, 1 },
1818 { 0, 2, 0, 0, 10, 1, 9, 1 },
1819 { 1, 2, 0, 0, 10, 1, 9, 1 },
1829 { 2, 2, 0, 0, 12, 1, 11, 1 },
1830 { 0, 2, 0, 0, 12, 1, 11, 1 },
1831 { 1, 2, 0, 0, 12, 1, 11, 1 },
1841 { 2, 2, 0, 0, 12, 1, 11, 1 },
1842 { 0, 2, 0, 0, 12, 1, 11, 1 },
1843 { 1, 2, 0, 0, 12, 1, 11, 1 },
1853 { 2, 2, 0, 0, 14, 1, 13, 1 },
1854 { 0, 2, 0, 0, 14, 1, 13, 1 },
1855 { 1, 2, 0, 0, 14, 1, 13, 1 },
1865 { 2, 2, 0, 0, 14, 1, 13, 1 },
1866 { 0, 2, 0, 0, 14, 1, 13, 1 },
1867 { 1, 2, 0, 0, 14, 1, 13, 1 },
1877 { 2, 2, 0, 0, 16, 1, 15, 1 },
1878 { 0, 2, 0, 0, 16, 1, 15, 1 },
1879 { 1, 2, 0, 0, 16, 1, 15, 1 },
1889 { 2, 2, 0, 0, 16, 1, 15, 1 },
1890 { 0, 2, 0, 0, 16, 1, 15, 1 },
1891 { 1, 2, 0, 0, 16, 1, 15, 1 },
1901 { 2, 1, 0, 0, 8, 0, 7, 1 },
1902 { 0, 1, 0, 0, 8, 0, 7, 1 },
1903 { 1, 1, 0, 0, 8, 0, 7, 1 },
1904 { 3, 1, 0, 0, 8, 0, 7, 1 },
1910 .name =
"gbrap16le",
1915 { 2, 2, 0, 0, 16, 1, 15, 1 },
1916 { 0, 2, 0, 0, 16, 1, 15, 1 },
1917 { 1, 2, 0, 0, 16, 1, 15, 1 },
1918 { 3, 2, 0, 0, 16, 1, 15, 1 },
1924 .name =
"gbrap16be",
1929 { 2, 2, 0, 0, 16, 1, 15, 1 },
1930 { 0, 2, 0, 0, 16, 1, 15, 1 },
1931 { 1, 2, 0, 0, 16, 1, 15, 1 },
1932 { 3, 2, 0, 0, 16, 1, 15, 1 },
1949 { 0, 6, 0, 4, 12, 5, 11, 1 },
1950 { 0, 6, 2, 4, 12, 5, 11, 3 },
1951 { 0, 6, 4, 4, 12, 5, 11, 5 },
1961 { 0, 6, 0, 4, 12, 5, 11, 1 },
1962 { 0, 6, 2, 4, 12, 5, 11, 3 },
1963 { 0, 6, 4, 4, 12, 5, 11, 5 },
1968 #define BAYER8_DESC_COMMON \
1969 .nb_components= 3, \
1970 .log2_chroma_w= 0, \
1971 .log2_chroma_h= 0, \
1978 #define BAYER16_DESC_COMMON \
1979 .nb_components= 3, \
1980 .log2_chroma_w= 0, \
1981 .log2_chroma_h= 0, \
1989 .name =
"bayer_bggr8",
1994 .name =
"bayer_bggr16le",
1999 .name =
"bayer_bggr16be",
2004 .name =
"bayer_rggb8",
2009 .name =
"bayer_rggb16le",
2014 .name =
"bayer_rggb16be",
2019 .name =
"bayer_gbrg8",
2024 .name =
"bayer_gbrg16le",
2029 .name =
"bayer_gbrg16be",
2034 .name =
"bayer_grbg8",
2039 .name =
"bayer_grbg16le",
2044 .name =
"bayer_grbg16be",
2054 { 0, 1, 0, 0, 8, 0, 7, 1 },
2055 { 1, 2, 0, 0, 8, 1, 7, 1 },
2056 { 1, 2, 1, 0, 8, 1, 7, 2 },
2066 { 0, 2, 0, 0, 10, 1, 9, 1 },
2067 { 1, 4, 0, 0, 10, 3, 9, 1 },
2068 { 1, 4, 2, 0, 10, 3, 9, 3 },
2078 { 0, 2, 0, 0, 10, 1, 9, 1 },
2079 { 1, 4, 0, 0, 10, 3, 9, 1 },
2080 { 1, 4, 2, 0, 10, 3, 9, 3 },
2089 .name =
"mediacodec",
2106 { 0, 8, 2, 0, 16, 7, 15, 3 },
2107 { 0, 8, 4, 0, 16, 7, 15, 5 },
2108 { 0, 8, 6, 0, 16, 7, 15, 7 },
2109 { 0, 8, 0, 0, 16, 7, 15, 1 },
2119 { 0, 8, 2, 0, 16, 7, 15, 3 },
2120 { 0, 8, 4, 0, 16, 7, 15, 5 },
2121 { 0, 8, 6, 0, 16, 7, 15, 7 },
2122 { 0, 8, 0, 0, 16, 7, 15, 1 },
2132 { 0, 2, 0, 6, 10, 1, 9, 1 },
2133 { 1, 4, 0, 6, 10, 3, 9, 1 },
2134 { 1, 4, 2, 6, 10, 3, 9, 3 },
2144 { 0, 2, 0, 6, 10, 1, 9, 1 },
2145 { 1, 4, 0, 6, 10, 3, 9, 1 },
2146 { 1, 4, 2, 6, 10, 3, 9, 3 },
2156 { 0, 2, 0, 0, 16, 1, 15, 1 },
2157 { 1, 4, 0, 0, 16, 3, 15, 1 },
2158 { 1, 4, 2, 0, 16, 3, 15, 3 },
2168 { 0, 2, 0, 0, 16, 1, 15, 1 },
2169 { 1, 4, 0, 0, 16, 3, 15, 1 },
2170 { 1, 4, 2, 0, 16, 3, 15, 3 },
2175 .name =
"gbrap12le",
2180 { 2, 2, 0, 0, 12, 1, 11, 1 },
2181 { 0, 2, 0, 0, 12, 1, 11, 1 },
2182 { 1, 2, 0, 0, 12, 1, 11, 1 },
2183 { 3, 2, 0, 0, 12, 1, 11, 1 },
2189 .name =
"gbrap12be",
2194 { 2, 2, 0, 0, 12, 1, 11, 1 },
2195 { 0, 2, 0, 0, 12, 1, 11, 1 },
2196 { 1, 2, 0, 0, 12, 1, 11, 1 },
2197 { 3, 2, 0, 0, 12, 1, 11, 1 },
2203 .name =
"gbrap10le",
2208 { 2, 2, 0, 0, 10, 1, 9, 1 },
2209 { 0, 2, 0, 0, 10, 1, 9, 1 },
2210 { 1, 2, 0, 0, 10, 1, 9, 1 },
2211 { 3, 2, 0, 0, 10, 1, 9, 1 },
2217 .name =
"gbrap10be",
2222 { 2, 2, 0, 0, 10, 1, 9, 1 },
2223 { 0, 2, 0, 0, 10, 1, 9, 1 },
2224 { 1, 2, 0, 0, 10, 1, 9, 1 },
2225 { 3, 2, 0, 0, 10, 1, 9, 1 },
2235 .name =
"gbrpf32be",
2240 { 2, 4, 0, 0, 32, 3, 31, 1 },
2241 { 0, 4, 0, 0, 32, 3, 31, 1 },
2242 { 1, 4, 0, 0, 32, 3, 31, 1 },
2248 .name =
"gbrpf32le",
2253 { 2, 4, 0, 0, 32, 3, 31, 1 },
2254 { 0, 4, 0, 0, 32, 3, 31, 1 },
2255 { 1, 4, 0, 0, 32, 3, 31, 1 },
2260 .name =
"gbrapf32be",
2265 { 2, 4, 0, 0, 32, 3, 31, 1 },
2266 { 0, 4, 0, 0, 32, 3, 31, 1 },
2267 { 1, 4, 0, 0, 32, 3, 31, 1 },
2268 { 3, 4, 0, 0, 32, 3, 31, 1 },
2275 .name =
"gbrapf32le",
2280 { 2, 4, 0, 0, 32, 3, 31, 1 },
2281 { 0, 4, 0, 0, 32, 3, 31, 1 },
2282 { 1, 4, 0, 0, 32, 3, 31, 1 },
2283 { 3, 4, 0, 0, 32, 3, 31, 1 },
2289 .name =
"drm_prime",
2297 .name =
"grayf32be",
2302 { 0, 4, 0, 0, 32, 3, 31, 1 },
2308 .name =
"grayf32le",
2313 { 0, 4, 0, 0, 32, 3, 31, 1 },
2319 .name =
"yuva422p12be",
2324 { 0, 2, 0, 0, 12, 1, 11, 1 },
2325 { 1, 2, 0, 0, 12, 1, 11, 1 },
2326 { 2, 2, 0, 0, 12, 1, 11, 1 },
2327 { 3, 2, 0, 0, 12, 1, 11, 1 },
2332 .name =
"yuva422p12le",
2337 { 0, 2, 0, 0, 12, 1, 11, 1 },
2338 { 1, 2, 0, 0, 12, 1, 11, 1 },
2339 { 2, 2, 0, 0, 12, 1, 11, 1 },
2340 { 3, 2, 0, 0, 12, 1, 11, 1 },
2345 .name =
"yuva444p12be",
2350 { 0, 2, 0, 0, 12, 1, 11, 1 },
2351 { 1, 2, 0, 0, 12, 1, 11, 1 },
2352 { 2, 2, 0, 0, 12, 1, 11, 1 },
2353 { 3, 2, 0, 0, 12, 1, 11, 1 },
2358 .name =
"yuva444p12le",
2363 { 0, 2, 0, 0, 12, 1, 11, 1 },
2364 { 1, 2, 0, 0, 12, 1, 11, 1 },
2365 { 2, 2, 0, 0, 12, 1, 11, 1 },
2366 { 3, 2, 0, 0, 12, 1, 11, 1 },
2376 { 0, 1, 0, 0, 8, 0, 7, 1 },
2377 { 1, 2, 0, 0, 8, 1, 7, 1 },
2378 { 1, 2, 1, 0, 8, 1, 7, 2 },
2388 { 0, 1, 0, 0, 8, 0, 7, 1 },
2389 { 1, 2, 1, 0, 8, 1, 7, 2 },
2390 { 1, 2, 0, 0, 8, 1, 7, 1 },
2399 #if FF_API_PLUS1_MINUS1
2496 # define X_NE(be, le) be
2498 # define X_NE(be, le) le
2505 if (!strcmp(
name,
"rgb32"))
2507 else if (!strcmp(
name,
"bgr32"))
2531 int s =
c == 1 ||
c == 2 ? 0 : log2_pixels;
2535 return bits >> log2_pixels;
2546 int s =
c == 1 ||
c == 2 ? 0 : log2_pixels;
2549 for (
c = 0;
c < 4;
c++)
2555 return bits >> log2_pixels;
2563 snprintf (buf, buf_size,
"name" " nb_components" " nb_bits");
2566 snprintf(buf, buf_size,
"%-11s %7d %10d", pixdesc->
name,
2602 int *h_shift,
int *v_shift)
2607 *h_shift =
desc->log2_chroma_w;
2608 *v_shift =
desc->log2_chroma_h;
2616 int i,
planes[4] = { 0 }, ret = 0;
2621 for (
i = 0;
i <
desc->nb_components;
i++)
2633 uint8_t fill[4][8+6+3] = {{0}};
2634 uint8_t *
data[4] = {fill[0], fill[1], fill[2], fill[3]};
2635 int linesize[4] = {0,0,0,0};
2650 av_assert0(!
c->plane && !
c->step && !
c->offset && !
c->shift && !
c->depth);
2662 tmp[0] =
tmp[1] = (1ULL <<
c->depth) - 1;
2675 if (!
desc || strlen(
desc->name) < 2)
2678 i = strlen(
name) - 2;
2679 if (strcmp(
name +
i,
"be") && strcmp(
name +
i,
"le"))
2682 name[
i] ^=
'b' ^
'l';
2687 #define FF_COLOR_NA -1
2688 #define FF_COLOR_RGB 0
2689 #define FF_COLOR_GRAY 1
2690 #define FF_COLOR_YUV 2
2691 #define FF_COLOR_YUV_JPEG 3
2692 #define FF_COLOR_XYZ 4
2694 #define pixdesc_has_alpha(pixdesc) \
2695 ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
2702 if(
desc->nb_components == 1 ||
desc->nb_components == 2)
2716 if(
desc->nb_components == 0)
2727 if (!
desc || !
desc->nb_components) {
2732 *
min = INT_MAX, *
max = -INT_MAX;
2733 for (
i = 0;
i <
desc->nb_components;
i++) {
2742 unsigned *lossp,
unsigned consider)
2746 int src_color, dst_color;
2747 int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
2748 int ret, loss,
i, nb_components;
2749 int score = INT_MAX - 1;
2751 if (!src_desc || !dst_desc)
2756 if (dst_pix_fmt == src_pix_fmt)
2765 if (dst_pix_fmt == src_pix_fmt)
2780 for (
i = 0;
i < nb_components;
i++) {
2784 score -= 65536 >> depth_minus1;
2827 if (src_color != dst_color)
2865 enum AVPixelFormat src_pix_fmt,
int has_alpha,
int *loss_ptr)
2868 int loss1, loss2, loss_mask;
2874 dst_pix_fmt = dst_pix_fmt2;
2875 }
else if (!desc2) {
2876 dst_pix_fmt = dst_pix_fmt1;
2878 loss_mask= loss_ptr?~*loss_ptr:~0;
2885 if (score1 == score2) {
2892 dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
static double val(void *priv, double ch)
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define flags(name, subs,...)
common internal and external API header
static enum AVPixelFormat pix_fmt
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
int av_match_name(const char *name, const char *names)
Match instances of a name in a comma-separated list of names.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
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.
common internal API header
#define FF_DISABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
static const struct @322 planes[]
static const uint16_t mask[17]
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
int av_color_space_from_name(const char *name)
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.
static const char *const color_transfer_names[]
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
int av_chroma_location_from_name(const char *name)
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
int av_color_transfer_from_name(const char *name)
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...
static int get_color_type(const AVPixFmtDescriptor *desc)
const char * av_chroma_location_name(enum AVChromaLocation location)
#define BAYER8_DESC_COMMON
void ff_check_pixfmt_descriptors(void)
#define pixdesc_has_alpha(pixdesc)
const char * av_color_range_name(enum AVColorRange range)
static const char *const chroma_location_names[]
#define FF_COLOR_YUV_JPEG
YUV color space.
static const char *const color_space_names[]
static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, unsigned *lossp, unsigned consider)
#define FF_COLOR_GRAY
gray color space
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.
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.
static FF_ENABLE_DEPRECATION_WARNINGS const char *const color_range_names[]
const char * av_color_space_name(enum AVColorSpace space)
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
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.
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.
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
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)
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 ...
static FF_DISABLE_DEPRECATION_WARNINGS const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
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)
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
#define BAYER16_DESC_COMMON
int av_color_range_from_name(const char *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.
#define FF_COLOR_YUV
YUV color space.
int av_color_primaries_from_name(const char *name)
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
static const char *const color_primaries_names[AVCOL_PRI_NB]
#define FF_COLOR_RGB
RGB color space.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
#define FF_LOSS_RESOLUTION
loss due to resolution change
#define FF_LOSS_COLORSPACE
loss due to color space conversion
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
#define FF_LOSS_ALPHA
loss of alpha bits
#define AV_PIX_FMT_FLAG_FLOAT
The pixel format contains IEEE-754 floating point values.
#define FF_LOSS_CHROMA
loss of chroma (e.g.
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
#define FF_LOSS_DEPTH
loss due to color depth change
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
#define FF_LOSS_COLORQUANT
loss due to color quantization
#define AV_PIX_FMT_FLAG_BAYER
The pixel format is following a Bayer pattern.
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
AVChromaLocation
Location of chroma samples.
@ AVCHROMA_LOC_TOPLEFT
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
@ AVCHROMA_LOC_NB
Not part of ABI.
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
@ AVCHROMA_LOC_BOTTOMLEFT
@ AVCHROMA_LOC_CENTER
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
@ AVCHROMA_LOC_UNSPECIFIED
AVColorRange
Visual content value range.
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
@ AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_NB
Not part of ABI.
@ AVCOL_RANGE_JPEG
Full range content.
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_BAYER_GBRG8
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
@ AV_PIX_FMT_YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
@ AV_PIX_FMT_VAAPI_MOCO
HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_r...
@ 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...
@ 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...
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_AYUV64BE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_P010LE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
@ AV_PIX_FMT_GRAY10LE
Y , 10bpp, little-endian.
@ AV_PIX_FMT_GRAYF32LE
IEEE-754 single precision Y, 32bpp, little-endian.
@ AV_PIX_FMT_VIDEOTOOLBOX
hardware decoding through Videotoolbox
@ AV_PIX_FMT_VAAPI_IDCT
HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state str...
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
@ AV_PIX_FMT_YA16BE
16 bits gray, 16 bits alpha (big-endian)
@ AV_PIX_FMT_YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
@ AV_PIX_FMT_YUVA444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
@ AV_PIX_FMT_NV42
as above, but U and V bytes are swapped
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_XVMC
XVideo Motion Acceleration via common packet passing.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
@ AV_PIX_FMT_YUV440P10BE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
@ AV_PIX_FMT_YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
@ AV_PIX_FMT_NB
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
@ AV_PIX_FMT_NV20LE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_BAYER_GRBG16LE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
@ AV_PIX_FMT_P016LE
like NV12, with 16bpp per component, little-endian
@ AV_PIX_FMT_DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
@ AV_PIX_FMT_P010BE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
@ AV_PIX_FMT_AYUV64LE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
@ AV_PIX_FMT_GRAY12LE
Y , 12bpp, little-endian.
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_NV20BE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
@ AV_PIX_FMT_GRAY12BE
Y , 12bpp, big-endian.
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ 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...
@ AV_PIX_FMT_YA16LE
16 bits gray, 16 bits alpha (little-endian)
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
@ AV_PIX_FMT_Y210LE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
@ 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...
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
@ AV_PIX_FMT_YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_P016BE
like NV12, with 16bpp per component, big-endian
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
@ 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...
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
@ 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...
@ 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...
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_MMAL
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure.
@ AV_PIX_FMT_YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_BAYER_RGGB16LE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
@ AV_PIX_FMT_RGB444LE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_DRM_PRIME
DRM-managed buffers exposed through PRIME buffer sharing.
@ AV_PIX_FMT_YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
@ AV_PIX_FMT_BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
@ AV_PIX_FMT_NV16
interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ 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...
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
@ AV_PIX_FMT_GRAY9BE
Y , 9bpp, big-endian.
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
@ AV_PIX_FMT_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
@ AV_PIX_FMT_D3D11
Hardware surfaces for Direct3D11.
@ AV_PIX_FMT_YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
@ 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...
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
@ AV_PIX_FMT_BAYER_BGGR16BE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian
@ AV_PIX_FMT_Y210BE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian
@ AV_PIX_FMT_D3D11VA_VLD
HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView p...
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_BGR444BE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
@ 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...
@ AV_PIX_FMT_BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
@ AV_PIX_FMT_BGR444LE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_BAYER_RGGB16BE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian
@ AV_PIX_FMT_X2RGB10LE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
@ AV_PIX_FMT_YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
@ AV_PIX_FMT_RGB444BE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ 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...
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
@ AV_PIX_FMT_BAYER_GRBG16BE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ 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...
@ AV_PIX_FMT_YUV440P12BE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
@ AV_PIX_FMT_YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_GRAY9LE
Y , 9bpp, little-endian.
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
@ AV_PIX_FMT_BAYER_BGGR16LE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
@ AV_PIX_FMT_YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
@ AV_PIX_FMT_GRAY14BE
Y , 14bpp, big-endian.
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
@ AV_PIX_FMT_YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_BAYER_GBRG16BE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
@ AV_PIX_FMT_VAAPI_VLD
HW decoding through VA API, Picture.data[3] contains a VASurfaceID.
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
@ AV_PIX_FMT_YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
@ 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 ...
@ AV_PIX_FMT_YUVA444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
@ 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 ...
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_X2RGB10BE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
@ AV_PIX_FMT_BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_PRI_NB
Not part of ABI.
@ AVCOL_PRI_FILM
colour filters using Illuminant C
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
@ AVCOL_PRI_SMPTE240M
functionally identical to above
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E / JEDEC P22 phosphors.
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
@ AVCOL_PRI_BT2020
ITU-R BT2020.
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
AVColorTransferCharacteristic
Color Transfer Characteristic.
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AVCOL_TRC_BT709
also ITU-R BT1361
@ AVCOL_TRC_NB
Not part of ABI.
AVColorSpace
YUV colorspace type.
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
@ AVCOL_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
@ AVCOL_SPC_NB
Not part of ABI.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
@ AVCOL_SPC_SMPTE240M
functionally identical to above
@ AVCOL_SPC_YCGCO
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
#define FF_ARRAY_ELEMS(a)
static int shift(int a, int b)
int depth
Number of bits in the component.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
uint8_t nb_components
The number of components each pixel has, (1-4)