37 int x,
int y,
int c,
int w,
38 int read_pal_component)
49 int skip = x * step + comp.
offset;
51 int shift = 8 - depth - (skip & 7);
55 if (read_pal_component)
56 val = data[1][4*val +
c];
65 int is_8bit = shift + depth <= 8;
71 int val = is_8bit ? *p :
73 val = (val >>
shift) & mask;
74 if (read_pal_component)
75 val = data[1][4 * val +
c];
85 int x,
int y,
int c,
int w)
94 int skip = x * step + comp.
offset;
96 int shift = 8 - depth - (skip & 7);
99 *p |= *src++ <<
shift;
109 if (shift + depth <= 8) {
112 *p |= (*src++ <<
shift);
130 #if FF_API_PLUS1_MINUS1
140 { 0, 1, 0, 0, 8, 0, 7, 1 },
141 { 1, 1, 0, 0, 8, 0, 7, 1 },
142 { 2, 1, 0, 0, 8, 0, 7, 1 },
152 { 0, 2, 0, 0, 8, 1, 7, 1 },
153 { 0, 4, 1, 0, 8, 3, 7, 2 },
154 { 0, 4, 3, 0, 8, 3, 7, 4 },
163 { 0, 2, 0, 0, 8, 1, 7, 1 },
164 { 0, 4, 3, 0, 8, 3, 7, 4 },
165 { 0, 4, 1, 0, 8, 3, 7, 2 },
174 { 0, 3, 0, 0, 8, 2, 7, 1 },
175 { 0, 3, 1, 0, 8, 2, 7, 2 },
176 { 0, 3, 2, 0, 8, 2, 7, 3 },
186 { 0, 3, 2, 0, 8, 2, 7, 3 },
187 { 0, 3, 1, 0, 8, 2, 7, 2 },
188 { 0, 3, 0, 0, 8, 2, 7, 1 },
198 { 0, 1, 0, 0, 8, 0, 7, 1 },
199 { 1, 1, 0, 0, 8, 0, 7, 1 },
200 { 2, 1, 0, 0, 8, 0, 7, 1 },
210 { 0, 1, 0, 0, 8, 0, 7, 1 },
211 { 1, 1, 0, 0, 8, 0, 7, 1 },
212 { 2, 1, 0, 0, 8, 0, 7, 1 },
222 { 0, 1, 0, 0, 8, 0, 7, 1 },
223 { 1, 1, 0, 0, 8, 0, 7, 1 },
224 { 2, 1, 0, 0, 8, 0, 7, 1 },
234 { 0, 1, 0, 0, 8, 0, 7, 1 },
235 { 1, 1, 0, 0, 8, 0, 7, 1 },
236 { 2, 1, 0, 0, 8, 0, 7, 1 },
246 { 0, 1, 0, 0, 8, 0, 7, 1 },
247 { 1, 1, 0, 0, 8, 0, 7, 1 },
248 { 2, 1, 0, 0, 8, 0, 7, 1 },
258 { 0, 1, 0, 0, 8, 0, 7, 1 },
269 { 0, 1, 0, 0, 1, 0, 0, 1 },
279 { 0, 1, 0, 7, 1, 0, 0, 1 },
289 { 0, 1, 0, 0, 8, 0, 7, 1 },
299 { 0, 1, 0, 0, 8, 0, 7, 1 },
300 { 1, 1, 0, 0, 8, 0, 7, 1 },
301 { 2, 1, 0, 0, 8, 0, 7, 1 },
311 { 0, 1, 0, 0, 8, 0, 7, 1 },
312 { 1, 1, 0, 0, 8, 0, 7, 1 },
313 { 2, 1, 0, 0, 8, 0, 7, 1 },
323 { 0, 1, 0, 0, 8, 0, 7, 1 },
324 { 1, 1, 0, 0, 8, 0, 7, 1 },
325 { 2, 1, 0, 0, 8, 0, 7, 1 },
351 { 0, 2, 1, 0, 8, 1, 7, 2 },
352 { 0, 4, 0, 0, 8, 3, 7, 1 },
353 { 0, 4, 2, 0, 8, 3, 7, 3 },
362 { 0, 4, 1, 0, 8, 3, 7, 2 },
363 { 0, 6, 0, 0, 8, 5, 7, 1 },
364 { 0, 6, 3, 0, 8, 5, 7, 4 },
373 { 0, 1, 0, 0, 3, 0, 2, 1 },
374 { 0, 1, 0, 3, 3, 0, 2, 1 },
375 { 0, 1, 0, 6, 2, 0, 1, 1 },
385 { 0, 4, 3, 0, 1, 3, 0, 4 },
386 { 0, 4, 1, 0, 2, 3, 1, 2 },
387 { 0, 4, 0, 0, 1, 3, 0, 1 },
397 { 0, 1, 0, 0, 1, 0, 0, 1 },
398 { 0, 1, 0, 1, 2, 0, 1, 1 },
399 { 0, 1, 0, 3, 1, 0, 0, 1 },
409 { 0, 1, 0, 6, 2, 0, 1, 1 },
410 { 0, 1, 0, 3, 3, 0, 2, 1 },
411 { 0, 1, 0, 0, 3, 0, 2, 1 },
421 { 0, 4, 0, 0, 1, 3, 0, 1 },
422 { 0, 4, 1, 0, 2, 3, 1, 2 },
423 { 0, 4, 3, 0, 1, 3, 0, 4 },
433 { 0, 1, 0, 3, 1, 0, 0, 1 },
434 { 0, 1, 0, 1, 2, 0, 1, 1 },
435 { 0, 1, 0, 0, 1, 0, 0, 1 },
445 { 0, 1, 0, 0, 8, 0, 7, 1 },
446 { 1, 2, 0, 0, 8, 1, 7, 1 },
447 { 1, 2, 1, 0, 8, 1, 7, 2 },
457 { 0, 1, 0, 0, 8, 0, 7, 1 },
458 { 1, 2, 1, 0, 8, 1, 7, 2 },
459 { 1, 2, 0, 0, 8, 1, 7, 1 },
469 { 0, 4, 1, 0, 8, 3, 7, 2 },
470 { 0, 4, 2, 0, 8, 3, 7, 3 },
471 { 0, 4, 3, 0, 8, 3, 7, 4 },
472 { 0, 4, 0, 0, 8, 3, 7, 1 },
482 { 0, 4, 0, 0, 8, 3, 7, 1 },
483 { 0, 4, 1, 0, 8, 3, 7, 2 },
484 { 0, 4, 2, 0, 8, 3, 7, 3 },
485 { 0, 4, 3, 0, 8, 3, 7, 4 },
495 { 0, 4, 3, 0, 8, 3, 7, 4 },
496 { 0, 4, 2, 0, 8, 3, 7, 3 },
497 { 0, 4, 1, 0, 8, 3, 7, 2 },
498 { 0, 4, 0, 0, 8, 3, 7, 1 },
508 { 0, 4, 2, 0, 8, 3, 7, 3 },
509 { 0, 4, 1, 0, 8, 3, 7, 2 },
510 { 0, 4, 0, 0, 8, 3, 7, 1 },
511 { 0, 4, 3, 0, 8, 3, 7, 4 },
521 { 0, 4, 1, 0, 8, 3, 7, 2 },
522 { 0, 4, 2, 0, 8, 3, 7, 3 },
523 { 0, 4, 3, 0, 8, 3, 7, 4 },
533 { 0, 4, 0, 0, 8, 3, 7, 1 },
534 { 0, 4, 1, 0, 8, 3, 7, 2 },
535 { 0, 4, 2, 0, 8, 3, 7, 3 },
545 { 0, 4, 3, 0, 8, 3, 7, 4 },
546 { 0, 4, 2, 0, 8, 3, 7, 3 },
547 { 0, 4, 1, 0, 8, 3, 7, 2 },
557 { 0, 4, 2, 0, 8, 3, 7, 3 },
558 { 0, 4, 1, 0, 8, 3, 7, 2 },
559 { 0, 4, 0, 0, 8, 3, 7, 1 },
569 { 0, 2, 0, 0, 10, 1, 9, 1 },
580 { 0, 2, 0, 0, 10, 1, 9, 1 },
590 { 0, 2, 0, 0, 12, 1, 11, 1 },
601 { 0, 2, 0, 0, 12, 1, 11, 1 },
611 { 0, 2, 0, 0, 16, 1, 15, 1 },
622 { 0, 2, 0, 0, 16, 1, 15, 1 },
632 { 0, 1, 0, 0, 8, 0, 7, 1 },
633 { 1, 1, 0, 0, 8, 0, 7, 1 },
634 { 2, 1, 0, 0, 8, 0, 7, 1 },
644 { 0, 1, 0, 0, 8, 0, 7, 1 },
645 { 1, 1, 0, 0, 8, 0, 7, 1 },
646 { 2, 1, 0, 0, 8, 0, 7, 1 },
651 .name =
"yuv440p10le",
656 { 0, 2, 0, 0, 10, 1, 9, 1 },
657 { 1, 2, 0, 0, 10, 1, 9, 1 },
658 { 2, 2, 0, 0, 10, 1, 9, 1 },
663 .name =
"yuv440p10be",
668 { 0, 2, 0, 0, 10, 1, 9, 1 },
669 { 1, 2, 0, 0, 10, 1, 9, 1 },
670 { 2, 2, 0, 0, 10, 1, 9, 1 },
675 .name =
"yuv440p12le",
680 { 0, 2, 0, 0, 12, 1, 11, 1 },
681 { 1, 2, 0, 0, 12, 1, 11, 1 },
682 { 2, 2, 0, 0, 12, 1, 11, 1 },
687 .name =
"yuv440p12be",
692 { 0, 2, 0, 0, 12, 1, 11, 1 },
693 { 1, 2, 0, 0, 12, 1, 11, 1 },
694 { 2, 2, 0, 0, 12, 1, 11, 1 },
704 { 0, 1, 0, 0, 8, 0, 7, 1 },
705 { 1, 1, 0, 0, 8, 0, 7, 1 },
706 { 2, 1, 0, 0, 8, 0, 7, 1 },
707 { 3, 1, 0, 0, 8, 0, 7, 1 },
717 { 0, 1, 0, 0, 8, 0, 7, 1 },
718 { 1, 1, 0, 0, 8, 0, 7, 1 },
719 { 2, 1, 0, 0, 8, 0, 7, 1 },
720 { 3, 1, 0, 0, 8, 0, 7, 1 },
730 { 0, 1, 0, 0, 8, 0, 7, 1 },
731 { 1, 1, 0, 0, 8, 0, 7, 1 },
732 { 2, 1, 0, 0, 8, 0, 7, 1 },
733 { 3, 1, 0, 0, 8, 0, 7, 1 },
738 .name =
"yuva420p9be",
743 { 0, 2, 0, 0, 9, 1, 8, 1 },
744 { 1, 2, 0, 0, 9, 1, 8, 1 },
745 { 2, 2, 0, 0, 9, 1, 8, 1 },
746 { 3, 2, 0, 0, 9, 1, 8, 1 },
751 .name =
"yuva420p9le",
756 { 0, 2, 0, 0, 9, 1, 8, 1 },
757 { 1, 2, 0, 0, 9, 1, 8, 1 },
758 { 2, 2, 0, 0, 9, 1, 8, 1 },
759 { 3, 2, 0, 0, 9, 1, 8, 1 },
764 .name =
"yuva422p9be",
769 { 0, 2, 0, 0, 9, 1, 8, 1 },
770 { 1, 2, 0, 0, 9, 1, 8, 1 },
771 { 2, 2, 0, 0, 9, 1, 8, 1 },
772 { 3, 2, 0, 0, 9, 1, 8, 1 },
777 .name =
"yuva422p9le",
782 { 0, 2, 0, 0, 9, 1, 8, 1 },
783 { 1, 2, 0, 0, 9, 1, 8, 1 },
784 { 2, 2, 0, 0, 9, 1, 8, 1 },
785 { 3, 2, 0, 0, 9, 1, 8, 1 },
790 .name =
"yuva444p9be",
795 { 0, 2, 0, 0, 9, 1, 8, 1 },
796 { 1, 2, 0, 0, 9, 1, 8, 1 },
797 { 2, 2, 0, 0, 9, 1, 8, 1 },
798 { 3, 2, 0, 0, 9, 1, 8, 1 },
803 .name =
"yuva444p9le",
808 { 0, 2, 0, 0, 9, 1, 8, 1 },
809 { 1, 2, 0, 0, 9, 1, 8, 1 },
810 { 2, 2, 0, 0, 9, 1, 8, 1 },
811 { 3, 2, 0, 0, 9, 1, 8, 1 },
816 .name =
"yuva420p10be",
821 { 0, 2, 0, 0, 10, 1, 9, 1 },
822 { 1, 2, 0, 0, 10, 1, 9, 1 },
823 { 2, 2, 0, 0, 10, 1, 9, 1 },
824 { 3, 2, 0, 0, 10, 1, 9, 1 },
829 .name =
"yuva420p10le",
834 { 0, 2, 0, 0, 10, 1, 9, 1 },
835 { 1, 2, 0, 0, 10, 1, 9, 1 },
836 { 2, 2, 0, 0, 10, 1, 9, 1 },
837 { 3, 2, 0, 0, 10, 1, 9, 1 },
842 .name =
"yuva422p10be",
847 { 0, 2, 0, 0, 10, 1, 9, 1 },
848 { 1, 2, 0, 0, 10, 1, 9, 1 },
849 { 2, 2, 0, 0, 10, 1, 9, 1 },
850 { 3, 2, 0, 0, 10, 1, 9, 1 },
855 .name =
"yuva422p10le",
860 { 0, 2, 0, 0, 10, 1, 9, 1 },
861 { 1, 2, 0, 0, 10, 1, 9, 1 },
862 { 2, 2, 0, 0, 10, 1, 9, 1 },
863 { 3, 2, 0, 0, 10, 1, 9, 1 },
868 .name =
"yuva444p10be",
873 { 0, 2, 0, 0, 10, 1, 9, 1 },
874 { 1, 2, 0, 0, 10, 1, 9, 1 },
875 { 2, 2, 0, 0, 10, 1, 9, 1 },
876 { 3, 2, 0, 0, 10, 1, 9, 1 },
881 .name =
"yuva444p10le",
886 { 0, 2, 0, 0, 10, 1, 9, 1 },
887 { 1, 2, 0, 0, 10, 1, 9, 1 },
888 { 2, 2, 0, 0, 10, 1, 9, 1 },
889 { 3, 2, 0, 0, 10, 1, 9, 1 },
894 .name =
"yuva420p16be",
899 { 0, 2, 0, 0, 16, 1, 15, 1 },
900 { 1, 2, 0, 0, 16, 1, 15, 1 },
901 { 2, 2, 0, 0, 16, 1, 15, 1 },
902 { 3, 2, 0, 0, 16, 1, 15, 1 },
907 .name =
"yuva420p16le",
912 { 0, 2, 0, 0, 16, 1, 15, 1 },
913 { 1, 2, 0, 0, 16, 1, 15, 1 },
914 { 2, 2, 0, 0, 16, 1, 15, 1 },
915 { 3, 2, 0, 0, 16, 1, 15, 1 },
920 .name =
"yuva422p16be",
925 { 0, 2, 0, 0, 16, 1, 15, 1 },
926 { 1, 2, 0, 0, 16, 1, 15, 1 },
927 { 2, 2, 0, 0, 16, 1, 15, 1 },
928 { 3, 2, 0, 0, 16, 1, 15, 1 },
933 .name =
"yuva422p16le",
938 { 0, 2, 0, 0, 16, 1, 15, 1 },
939 { 1, 2, 0, 0, 16, 1, 15, 1 },
940 { 2, 2, 0, 0, 16, 1, 15, 1 },
941 { 3, 2, 0, 0, 16, 1, 15, 1 },
946 .name =
"yuva444p16be",
951 { 0, 2, 0, 0, 16, 1, 15, 1 },
952 { 1, 2, 0, 0, 16, 1, 15, 1 },
953 { 2, 2, 0, 0, 16, 1, 15, 1 },
954 { 3, 2, 0, 0, 16, 1, 15, 1 },
959 .name =
"yuva444p16le",
964 { 0, 2, 0, 0, 16, 1, 15, 1 },
965 { 1, 2, 0, 0, 16, 1, 15, 1 },
966 { 2, 2, 0, 0, 16, 1, 15, 1 },
967 { 3, 2, 0, 0, 16, 1, 15, 1 },
973 .name =
"vdpau_h264",
979 .name =
"vdpau_mpeg1",
985 .name =
"vdpau_mpeg2",
991 .name =
"vdpau_wmv3",
1003 .name =
"vdpau_mpeg4",
1015 { 0, 6, 0, 0, 16, 5, 15, 1 },
1016 { 0, 6, 2, 0, 16, 5, 15, 3 },
1017 { 0, 6, 4, 0, 16, 5, 15, 5 },
1027 { 0, 6, 0, 0, 16, 5, 15, 1 },
1028 { 0, 6, 2, 0, 16, 5, 15, 3 },
1029 { 0, 6, 4, 0, 16, 5, 15, 5 },
1039 { 0, 8, 0, 0, 16, 7, 15, 1 },
1040 { 0, 8, 2, 0, 16, 7, 15, 3 },
1041 { 0, 8, 4, 0, 16, 7, 15, 5 },
1042 { 0, 8, 6, 0, 16, 7, 15, 7 },
1052 { 0, 8, 0, 0, 16, 7, 15, 1 },
1053 { 0, 8, 2, 0, 16, 7, 15, 3 },
1054 { 0, 8, 4, 0, 16, 7, 15, 5 },
1055 { 0, 8, 6, 0, 16, 7, 15, 7 },
1065 { 0, 2, -1, 3, 5, 1, 4, 0 },
1066 { 0, 2, 0, 5, 6, 1, 5, 1 },
1067 { 0, 2, 0, 0, 5, 1, 4, 1 },
1077 { 0, 2, 1, 3, 5, 1, 4, 2 },
1078 { 0, 2, 0, 5, 6, 1, 5, 1 },
1079 { 0, 2, 0, 0, 5, 1, 4, 1 },
1089 { 0, 2, -1, 2, 5, 1, 4, 0 },
1090 { 0, 2, 0, 5, 5, 1, 4, 1 },
1091 { 0, 2, 0, 0, 5, 1, 4, 1 },
1101 { 0, 2, 1, 2, 5, 1, 4, 2 },
1102 { 0, 2, 0, 5, 5, 1, 4, 1 },
1103 { 0, 2, 0, 0, 5, 1, 4, 1 },
1113 { 0, 2, -1, 0, 4, 1, 3, 0 },
1114 { 0, 2, 0, 4, 4, 1, 3, 1 },
1115 { 0, 2, 0, 0, 4, 1, 3, 1 },
1125 { 0, 2, 1, 0, 4, 1, 3, 2 },
1126 { 0, 2, 0, 4, 4, 1, 3, 1 },
1127 { 0, 2, 0, 0, 4, 1, 3, 1 },
1137 { 0, 6, 4, 0, 16, 5, 15, 5 },
1138 { 0, 6, 2, 0, 16, 5, 15, 3 },
1139 { 0, 6, 0, 0, 16, 5, 15, 1 },
1149 { 0, 6, 4, 0, 16, 5, 15, 5 },
1150 { 0, 6, 2, 0, 16, 5, 15, 3 },
1151 { 0, 6, 0, 0, 16, 5, 15, 1 },
1161 { 0, 8, 4, 0, 16, 7, 15, 5 },
1162 { 0, 8, 2, 0, 16, 7, 15, 3 },
1163 { 0, 8, 0, 0, 16, 7, 15, 1 },
1164 { 0, 8, 6, 0, 16, 7, 15, 7 },
1174 { 0, 8, 4, 0, 16, 7, 15, 5 },
1175 { 0, 8, 2, 0, 16, 7, 15, 3 },
1176 { 0, 8, 0, 0, 16, 7, 15, 1 },
1177 { 0, 8, 6, 0, 16, 7, 15, 7 },
1187 { 0, 2, 0, 0, 5, 1, 4, 1 },
1188 { 0, 2, 0, 5, 6, 1, 5, 1 },
1189 { 0, 2, -1, 3, 5, 1, 4, 0 },
1199 { 0, 2, 0, 0, 5, 1, 4, 1 },
1200 { 0, 2, 0, 5, 6, 1, 5, 1 },
1201 { 0, 2, 1, 3, 5, 1, 4, 2 },
1211 { 0, 2, 0, 0, 5, 1, 4, 1 },
1212 { 0, 2, 0, 5, 5, 1, 4, 1 },
1213 { 0, 2, -1, 2, 5, 1, 4, 0 },
1223 { 0, 2, 0, 0, 5, 1, 4, 1 },
1224 { 0, 2, 0, 5, 5, 1, 4, 1 },
1225 { 0, 2, 1, 2, 5, 1, 4, 2 },
1235 { 0, 2, 0, 0, 4, 1, 3, 1 },
1236 { 0, 2, 0, 4, 4, 1, 3, 1 },
1237 { 0, 2, -1, 0, 4, 1, 3, 0 },
1247 { 0, 2, 0, 0, 4, 1, 3, 1 },
1248 { 0, 2, 0, 4, 4, 1, 3, 1 },
1249 { 0, 2, 1, 0, 4, 1, 3, 2 },
1255 .name =
"vaapi_moco",
1261 .name =
"vaapi_idct",
1267 .name =
"vaapi_vld",
1281 .name =
"yuv420p9le",
1286 { 0, 2, 0, 0, 9, 1, 8, 1 },
1287 { 1, 2, 0, 0, 9, 1, 8, 1 },
1288 { 2, 2, 0, 0, 9, 1, 8, 1 },
1293 .name =
"yuv420p9be",
1298 { 0, 2, 0, 0, 9, 1, 8, 1 },
1299 { 1, 2, 0, 0, 9, 1, 8, 1 },
1300 { 2, 2, 0, 0, 9, 1, 8, 1 },
1305 .name =
"yuv420p10le",
1310 { 0, 2, 0, 0, 10, 1, 9, 1 },
1311 { 1, 2, 0, 0, 10, 1, 9, 1 },
1312 { 2, 2, 0, 0, 10, 1, 9, 1 },
1317 .name =
"yuv420p10be",
1322 { 0, 2, 0, 0, 10, 1, 9, 1 },
1323 { 1, 2, 0, 0, 10, 1, 9, 1 },
1324 { 2, 2, 0, 0, 10, 1, 9, 1 },
1329 .name =
"yuv420p12le",
1334 { 0, 2, 0, 0, 12, 1, 11, 1 },
1335 { 1, 2, 0, 0, 12, 1, 11, 1 },
1336 { 2, 2, 0, 0, 12, 1, 11, 1 },
1341 .name =
"yuv420p12be",
1346 { 0, 2, 0, 0, 12, 1, 11, 1 },
1347 { 1, 2, 0, 0, 12, 1, 11, 1 },
1348 { 2, 2, 0, 0, 12, 1, 11, 1 },
1353 .name =
"yuv420p14le",
1358 { 0, 2, 0, 0, 14, 1, 13, 1 },
1359 { 1, 2, 0, 0, 14, 1, 13, 1 },
1360 { 2, 2, 0, 0, 14, 1, 13, 1 },
1365 .name =
"yuv420p14be",
1370 { 0, 2, 0, 0, 14, 1, 13, 1 },
1371 { 1, 2, 0, 0, 14, 1, 13, 1 },
1372 { 2, 2, 0, 0, 14, 1, 13, 1 },
1377 .name =
"yuv420p16le",
1382 { 0, 2, 0, 0, 16, 1, 15, 1 },
1383 { 1, 2, 0, 0, 16, 1, 15, 1 },
1384 { 2, 2, 0, 0, 16, 1, 15, 1 },
1389 .name =
"yuv420p16be",
1394 { 0, 2, 0, 0, 16, 1, 15, 1 },
1395 { 1, 2, 0, 0, 16, 1, 15, 1 },
1396 { 2, 2, 0, 0, 16, 1, 15, 1 },
1401 .name =
"yuv422p9le",
1406 { 0, 2, 0, 0, 9, 1, 8, 1 },
1407 { 1, 2, 0, 0, 9, 1, 8, 1 },
1408 { 2, 2, 0, 0, 9, 1, 8, 1 },
1413 .name =
"yuv422p9be",
1418 { 0, 2, 0, 0, 9, 1, 8, 1 },
1419 { 1, 2, 0, 0, 9, 1, 8, 1 },
1420 { 2, 2, 0, 0, 9, 1, 8, 1 },
1425 .name =
"yuv422p10le",
1430 { 0, 2, 0, 0, 10, 1, 9, 1 },
1431 { 1, 2, 0, 0, 10, 1, 9, 1 },
1432 { 2, 2, 0, 0, 10, 1, 9, 1 },
1437 .name =
"yuv422p10be",
1442 { 0, 2, 0, 0, 10, 1, 9, 1 },
1443 { 1, 2, 0, 0, 10, 1, 9, 1 },
1444 { 2, 2, 0, 0, 10, 1, 9, 1 },
1449 .name =
"yuv422p12le",
1454 { 0, 2, 0, 0, 12, 1, 11, 1 },
1455 { 1, 2, 0, 0, 12, 1, 11, 1 },
1456 { 2, 2, 0, 0, 12, 1, 11, 1 },
1461 .name =
"yuv422p12be",
1466 { 0, 2, 0, 0, 12, 1, 11, 1 },
1467 { 1, 2, 0, 0, 12, 1, 11, 1 },
1468 { 2, 2, 0, 0, 12, 1, 11, 1 },
1473 .name =
"yuv422p14le",
1478 { 0, 2, 0, 0, 14, 1, 13, 1 },
1479 { 1, 2, 0, 0, 14, 1, 13, 1 },
1480 { 2, 2, 0, 0, 14, 1, 13, 1 },
1485 .name =
"yuv422p14be",
1490 { 0, 2, 0, 0, 14, 1, 13, 1 },
1491 { 1, 2, 0, 0, 14, 1, 13, 1 },
1492 { 2, 2, 0, 0, 14, 1, 13, 1 },
1497 .name =
"yuv422p16le",
1502 { 0, 2, 0, 0, 16, 1, 15, 1 },
1503 { 1, 2, 0, 0, 16, 1, 15, 1 },
1504 { 2, 2, 0, 0, 16, 1, 15, 1 },
1509 .name =
"yuv422p16be",
1514 { 0, 2, 0, 0, 16, 1, 15, 1 },
1515 { 1, 2, 0, 0, 16, 1, 15, 1 },
1516 { 2, 2, 0, 0, 16, 1, 15, 1 },
1521 .name =
"yuv444p16le",
1526 { 0, 2, 0, 0, 16, 1, 15, 1 },
1527 { 1, 2, 0, 0, 16, 1, 15, 1 },
1528 { 2, 2, 0, 0, 16, 1, 15, 1 },
1533 .name =
"yuv444p16be",
1538 { 0, 2, 0, 0, 16, 1, 15, 1 },
1539 { 1, 2, 0, 0, 16, 1, 15, 1 },
1540 { 2, 2, 0, 0, 16, 1, 15, 1 },
1545 .name =
"yuv444p10le",
1550 { 0, 2, 0, 0, 10, 1, 9, 1 },
1551 { 1, 2, 0, 0, 10, 1, 9, 1 },
1552 { 2, 2, 0, 0, 10, 1, 9, 1 },
1557 .name =
"yuv444p10be",
1562 { 0, 2, 0, 0, 10, 1, 9, 1 },
1563 { 1, 2, 0, 0, 10, 1, 9, 1 },
1564 { 2, 2, 0, 0, 10, 1, 9, 1 },
1569 .name =
"yuv444p9le",
1574 { 0, 2, 0, 0, 9, 1, 8, 1 },
1575 { 1, 2, 0, 0, 9, 1, 8, 1 },
1576 { 2, 2, 0, 0, 9, 1, 8, 1 },
1581 .name =
"yuv444p9be",
1586 { 0, 2, 0, 0, 9, 1, 8, 1 },
1587 { 1, 2, 0, 0, 9, 1, 8, 1 },
1588 { 2, 2, 0, 0, 9, 1, 8, 1 },
1593 .name =
"yuv444p12le",
1598 { 0, 2, 0, 0, 12, 1, 11, 1 },
1599 { 1, 2, 0, 0, 12, 1, 11, 1 },
1600 { 2, 2, 0, 0, 12, 1, 11, 1 },
1605 .name =
"yuv444p12be",
1610 { 0, 2, 0, 0, 12, 1, 11, 1 },
1611 { 1, 2, 0, 0, 12, 1, 11, 1 },
1612 { 2, 2, 0, 0, 12, 1, 11, 1 },
1617 .name =
"yuv444p14le",
1622 { 0, 2, 0, 0, 14, 1, 13, 1 },
1623 { 1, 2, 0, 0, 14, 1, 13, 1 },
1624 { 2, 2, 0, 0, 14, 1, 13, 1 },
1629 .name =
"yuv444p14be",
1634 { 0, 2, 0, 0, 14, 1, 13, 1 },
1635 { 1, 2, 0, 0, 14, 1, 13, 1 },
1636 { 2, 2, 0, 0, 14, 1, 13, 1 },
1641 .name =
"d3d11va_vld",
1647 .name =
"dxva2_vld",
1662 { 0, 2, 0, 0, 8, 1, 7, 1 },
1663 { 0, 2, 1, 0, 8, 1, 7, 2 },
1672 { 0, 4, 0, 0, 16, 3, 15, 1 },
1673 { 0, 4, 2, 0, 16, 3, 15, 3 },
1681 { 0, 4, 0, 0, 16, 3, 15, 1 },
1682 { 0, 4, 2, 0, 16, 3, 15, 3 },
1687 .name =
"videotoolbox_vld",
1696 { 2, 1, 0, 0, 8, 0, 7, 1 },
1697 { 0, 1, 0, 0, 8, 0, 7, 1 },
1698 { 1, 1, 0, 0, 8, 0, 7, 1 },
1708 { 2, 2, 0, 0, 9, 1, 8, 1 },
1709 { 0, 2, 0, 0, 9, 1, 8, 1 },
1710 { 1, 2, 0, 0, 9, 1, 8, 1 },
1720 { 2, 2, 0, 0, 9, 1, 8, 1 },
1721 { 0, 2, 0, 0, 9, 1, 8, 1 },
1722 { 1, 2, 0, 0, 9, 1, 8, 1 },
1732 { 2, 2, 0, 0, 10, 1, 9, 1 },
1733 { 0, 2, 0, 0, 10, 1, 9, 1 },
1734 { 1, 2, 0, 0, 10, 1, 9, 1 },
1744 { 2, 2, 0, 0, 10, 1, 9, 1 },
1745 { 0, 2, 0, 0, 10, 1, 9, 1 },
1746 { 1, 2, 0, 0, 10, 1, 9, 1 },
1756 { 2, 2, 0, 0, 12, 1, 11, 1 },
1757 { 0, 2, 0, 0, 12, 1, 11, 1 },
1758 { 1, 2, 0, 0, 12, 1, 11, 1 },
1768 { 2, 2, 0, 0, 12, 1, 11, 1 },
1769 { 0, 2, 0, 0, 12, 1, 11, 1 },
1770 { 1, 2, 0, 0, 12, 1, 11, 1 },
1780 { 2, 2, 0, 0, 14, 1, 13, 1 },
1781 { 0, 2, 0, 0, 14, 1, 13, 1 },
1782 { 1, 2, 0, 0, 14, 1, 13, 1 },
1792 { 2, 2, 0, 0, 14, 1, 13, 1 },
1793 { 0, 2, 0, 0, 14, 1, 13, 1 },
1794 { 1, 2, 0, 0, 14, 1, 13, 1 },
1804 { 2, 2, 0, 0, 16, 1, 15, 1 },
1805 { 0, 2, 0, 0, 16, 1, 15, 1 },
1806 { 1, 2, 0, 0, 16, 1, 15, 1 },
1816 { 2, 2, 0, 0, 16, 1, 15, 1 },
1817 { 0, 2, 0, 0, 16, 1, 15, 1 },
1818 { 1, 2, 0, 0, 16, 1, 15, 1 },
1828 { 2, 1, 0, 0, 8, 0, 7, 1 },
1829 { 0, 1, 0, 0, 8, 0, 7, 1 },
1830 { 1, 1, 0, 0, 8, 0, 7, 1 },
1831 { 3, 1, 0, 0, 8, 0, 7, 1 },
1837 .name =
"gbrap16le",
1842 { 2, 2, 0, 0, 16, 1, 15, 1 },
1843 { 0, 2, 0, 0, 16, 1, 15, 1 },
1844 { 1, 2, 0, 0, 16, 1, 15, 1 },
1845 { 3, 2, 0, 0, 16, 1, 15, 1 },
1851 .name =
"gbrap16be",
1856 { 2, 2, 0, 0, 16, 1, 15, 1 },
1857 { 0, 2, 0, 0, 16, 1, 15, 1 },
1858 { 1, 2, 0, 0, 16, 1, 15, 1 },
1859 { 3, 2, 0, 0, 16, 1, 15, 1 },
1876 { 0, 6, 0, 4, 12, 5, 11, 1 },
1877 { 0, 6, 2, 4, 12, 5, 11, 3 },
1878 { 0, 6, 4, 4, 12, 5, 11, 5 },
1888 { 0, 6, 0, 4, 12, 5, 11, 1 },
1889 { 0, 6, 2, 4, 12, 5, 11, 3 },
1890 { 0, 6, 4, 4, 12, 5, 11, 5 },
1895 #define BAYER8_DESC_COMMON \
1896 .nb_components= 3, \
1897 .log2_chroma_w= 0, \
1898 .log2_chroma_h= 0, \
1905 #define BAYER16_DESC_COMMON \
1906 .nb_components= 3, \
1907 .log2_chroma_w= 0, \
1908 .log2_chroma_h= 0, \
1916 .name =
"bayer_bggr8",
1921 .name =
"bayer_bggr16le",
1926 .name =
"bayer_bggr16be",
1931 .name =
"bayer_rggb8",
1936 .name =
"bayer_rggb16le",
1941 .name =
"bayer_rggb16be",
1946 .name =
"bayer_gbrg8",
1951 .name =
"bayer_gbrg16le",
1956 .name =
"bayer_gbrg16be",
1961 .name =
"bayer_grbg8",
1966 .name =
"bayer_grbg16le",
1971 .name =
"bayer_grbg16be",
1981 { 0, 1, 0, 0, 8, 0, 7, 1 },
1982 { 1, 2, 0, 0, 8, 1, 7, 1 },
1983 { 1, 2, 1, 0, 8, 1, 7, 2 },
1993 { 0, 2, 0, 0, 10, 1, 9, 1 },
1994 { 1, 4, 0, 0, 10, 3, 9, 1 },
1995 { 1, 4, 2, 0, 10, 3, 9, 3 },
2005 { 0, 2, 0, 0, 10, 1, 9, 1 },
2006 { 1, 4, 0, 0, 10, 3, 9, 1 },
2007 { 1, 4, 2, 0, 10, 3, 9, 3 },
2020 .name =
"mediacodec",
2037 { 0, 8, 2, 0, 16, 7, 15, 3 },
2038 { 0, 8, 4, 0, 16, 7, 15, 5 },
2039 { 0, 8, 6, 0, 16, 7, 15, 7 },
2040 { 0, 8, 0, 0, 16, 7, 15, 1 },
2050 { 0, 8, 2, 0, 16, 7, 15, 3 },
2051 { 0, 8, 4, 0, 16, 7, 15, 5 },
2052 { 0, 8, 6, 0, 16, 7, 15, 7 },
2053 { 0, 8, 0, 0, 16, 7, 15, 1 },
2063 { 0, 2, 0, 6, 10, 1, 9, 1 },
2064 { 1, 4, 0, 6, 10, 3, 9, 1 },
2065 { 1, 4, 2, 6, 10, 3, 9, 3 },
2075 { 0, 2, 0, 6, 10, 1, 9, 1 },
2076 { 1, 4, 0, 6, 10, 3, 9, 1 },
2077 { 1, 4, 2, 6, 10, 3, 9, 3 },
2087 { 0, 2, 0, 0, 16, 1, 15, 1 },
2088 { 1, 4, 0, 0, 16, 3, 15, 1 },
2089 { 1, 4, 2, 0, 16, 3, 15, 3 },
2099 { 0, 2, 0, 0, 16, 1, 15, 1 },
2100 { 1, 4, 0, 0, 16, 3, 15, 1 },
2101 { 1, 4, 2, 0, 16, 3, 15, 3 },
2106 .name =
"gbrap12le",
2111 { 2, 2, 0, 0, 12, 1, 11, 1 },
2112 { 0, 2, 0, 0, 12, 1, 11, 1 },
2113 { 1, 2, 0, 0, 12, 1, 11, 1 },
2114 { 3, 2, 0, 0, 12, 1, 11, 1 },
2120 .name =
"gbrap12be",
2125 { 2, 2, 0, 0, 12, 1, 11, 1 },
2126 { 0, 2, 0, 0, 12, 1, 11, 1 },
2127 { 1, 2, 0, 0, 12, 1, 11, 1 },
2128 { 3, 2, 0, 0, 12, 1, 11, 1 },
2134 .name =
"gbrap10le",
2139 { 2, 2, 0, 0, 10, 1, 9, 1 },
2140 { 0, 2, 0, 0, 10, 1, 9, 1 },
2141 { 1, 2, 0, 0, 10, 1, 9, 1 },
2142 { 3, 2, 0, 0, 10, 1, 9, 1 },
2148 .name =
"gbrap10be",
2153 { 2, 2, 0, 0, 10, 1, 9, 1 },
2154 { 0, 2, 0, 0, 10, 1, 9, 1 },
2155 { 1, 2, 0, 0, 10, 1, 9, 1 },
2156 { 3, 2, 0, 0, 10, 1, 9, 1 },
2162 #if FF_API_PLUS1_MINUS1
2241 if (av_pix_fmt_descriptors[pix_fmt].name &&
2242 (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
2243 av_match_name(name, av_pix_fmt_descriptors[pix_fmt].alias)))
2256 # define X_NE(be, le) be
2258 # define X_NE(be, le) le
2265 if (!strcmp(name,
"rgb32"))
2266 name =
X_NE(
"argb",
"bgra");
2267 else if (!strcmp(name,
"bgr32"))
2268 name =
X_NE(
"abgr",
"rgba");
2274 snprintf(name2,
sizeof(name2),
"%s%s", name,
X_NE(
"be",
"le"));
2291 int s = c == 1 || c == 2 ? 0 : log2_pixels;
2295 return bits >> log2_pixels;
2306 int s = c == 1 || c == 2 ? 0 : log2_pixels;
2309 for (c = 0; c < 4; c++)
2315 return bits >> log2_pixels;
2323 snprintf (buf, buf_size,
"name" " nb_components" " nb_bits");
2326 snprintf(buf, buf_size,
"%-11s %7d %10d", pixdesc->
name,
2337 return &av_pix_fmt_descriptors[
pix_fmt];
2343 return &av_pix_fmt_descriptors[0];
2344 while (prev - av_pix_fmt_descriptors <
FF_ARRAY_ELEMS(av_pix_fmt_descriptors) - 1) {
2354 if (desc < av_pix_fmt_descriptors ||
2355 desc >= av_pix_fmt_descriptors +
FF_ARRAY_ELEMS(av_pix_fmt_descriptors))
2362 int *h_shift,
int *v_shift)
2376 int i, planes[4] = { 0 }, ret = 0;
2393 uint8_t fill[4][8+6+3] = {{0}};
2394 uint8_t *
data[4] = {fill[0], fill[1], fill[2], fill[3]};
2395 int linesize[4] = {0,0,0,0};
2423 tmp[0] = tmp[1] = (1<<c->
depth) - 1;
2436 if (!desc || strlen(desc->
name) < 2)
2439 i = strlen(name) - 2;
2440 if (strcmp(name + i,
"be") && strcmp(name + i,
"le"))
2443 name[i] ^=
'b' ^
'l';
2448 #define FF_COLOR_NA -1
2449 #define FF_COLOR_RGB 0
2450 #define FF_COLOR_GRAY 1
2451 #define FF_COLOR_YUV 2
2452 #define FF_COLOR_YUV_JPEG 3
2453 #define FF_COLOR_XYZ 4
2455 #define pixdesc_has_alpha(pixdesc) \
2456 ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
2466 if(desc->
name && !strncmp(desc->
name,
"yuvj", 4))
2469 if(desc->
name && !strncmp(desc->
name,
"xyz", 3))
2491 *min = INT_MAX, *max = -INT_MAX;
2501 unsigned *lossp,
unsigned consider)
2505 int src_color, dst_color;
2506 int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
2507 int ret, loss, i, nb_components;
2508 int score = INT_MAX - 1;
2516 if (dst_pix_fmt == src_pix_fmt)
2531 for (i = 0; i < nb_components; i++) {
2535 score -= 65536 >> depth_minus1;
2578 if (src_color != dst_color)
2582 if(loss & FF_LOSS_COLORSPACE)
2616 enum AVPixelFormat src_pix_fmt,
int has_alpha,
int *loss_ptr)
2619 int loss1, loss2, loss_mask;
2624 loss_mask= loss_ptr?~*loss_ptr:~0;
2631 if (score1 == score2) {
2638 dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
ITU-R BT2020 for 12-bit system.
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
planar GBR 4:4:4:4 40bpp, little-endian
int plane
Which of the 4 planes contains the component.
HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_r...
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
const char const char void * val
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
static enum AVPixelFormat pix_fmt
static int shift(int a, int b)
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
ptrdiff_t const GLvoid * data
"Linear transfer characteristics"
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
8 bits gray, 8 bits alpha
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstr...
#define FF_LOSS_ALPHA
loss of alpha bits
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
packed RGB 8:8:8, 24bpp, RGBRGB...
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
hardware decoding through Videotoolbox
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#define FF_LOSS_CHROMA
loss of chroma (e.g.
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
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...
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples */
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples */
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined ...
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */
HW decoding through VA API, Picture.data[3] contains a VASurfaceID.
static const char * color_primaries_names[AVCOL_PRI_NB]
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
planar GBR 4:4:4 36bpp, little-endian
SMPTE ST 431-2 (2011) / DCI P3.
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples */
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
Y , 12bpp, little-endian.
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
planar GBR 4:4:4 36bpp, big-endian
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
AVColorTransferCharacteristic
Color Transfer Characteristic.
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
functionally identical to above
const char * av_color_space_name(enum AVColorSpace space)
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian ...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
planar GBRA 4:4:4:4 64bpp, big-endian
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define BAYER16_DESC_COMMON
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
8 bits with AV_PIX_FMT_RGB32 palette
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
AVColorSpace
YUV colorspace type.
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian */
const char * av_color_range_name(enum AVColorRange range)
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined ...
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
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)
Write the values from src to the pixel format component c of an image line.
static FF_ENABLE_DEPRECATION_WARNINGS const char * color_range_names[]
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
planar GBR 4:4:4 48bpp, big-endian
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstr...
WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstrea...
Y , 10bpp, little-endian.
AVColorRange
MPEG vs JPEG YUV range.
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
AVColorPrimaries
Chromaticity coordinates of the source primaries.
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian */
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
planar GBR 4:4:4 27bpp, big-endian
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
const char * av_chroma_location_name(enum AVChromaLocation location)
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
16 bits gray, 16 bits alpha (big-endian)
ITU-R BT1361 Extended Colour Gamut.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
static const uint16_t mask[17]
like NV12, with 16bpp per component, big-endian
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
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.
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
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 ...
#define FF_LOSS_DEPTH
loss due to color depth change
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
simple assert() macros that are a bit more flexible than ISO C assert().
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
XVideo Motion Acceleration via common packet passing.
like NV12, with 16bpp per component, little-endian
SMPTE ST 428-1 (CIE 1931 XYZ)
int av_match_name(const char *name, const char *names)
Match instances of a name in a comma-separated list of names.
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian
Libavutil version macros.
HW acceleration through VDA, data[3] contains a CVPixelBufferRef.
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
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.
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
static const char * color_transfer_names[]
common internal API header
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
as above, but U and V bytes are swapped
planar GBR 4:4:4:4 48bpp, big-endian
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
uint8_t nb_components
The number of components each pixel has, (1-4)
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
#define BAYER8_DESC_COMMON
planar GBR 4:4:4:4 40bpp, big-endian
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
colour filters using Illuminant C
#define FF_COLOR_YUV_JPEG
YUV color space.
ITU-R BT2020 non-constant luminance system.
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
#define AV_PIX_FMT_FLAG_PSEUDOPAL
The pixel format is "pseudo-paletted".
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
packed RGB 8:8:8, 24bpp, BGRBGR...
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
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...
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian ...
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian
static int get_color_type(const AVPixFmtDescriptor *desc)
#define pixdesc_has_alpha(pixdesc)
#define AV_PIX_FMT_FLAG_BAYER
The pixel format is following a Bayer pattern.
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
HW acceleration through CUDA.
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
#define FF_ARRAY_ELEMS(a)
the normal 2^n-1 "JPEG" YUV ranges
HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state str...
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
planar GBR 4:4:4:4 48bpp, little-endian
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
functionally identical to above
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian */
planar GBR 4:4:4 30bpp, big-endian
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, unsigned *lossp, unsigned consider)
#define FF_COLOR_YUV
YUV color space.
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
planar GBR 4:4:4 42bpp, little-endian
MPEG-4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstr...
static const char * color_space_names[]
H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstre...
static FF_DISABLE_DEPRECATION_WARNINGS const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
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...
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
planar GBR 4:4:4 42bpp, big-endian
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined ...
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian */
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
int shift
Number of least significant bits that must be shifted away to get the value.
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)
Read a line from an image, and write the values of the pixel format component c to dst...
int offset
Number of elements before the component of the first pixel.
hardware decoding through MediaCodec
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian */
#define FF_COLOR_RGB
RGB color space.
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
the normal 219*2^(n-8) "MPEG" YUV ranges
ITU-R BT2020 constant luminance system.
VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstrea...
#define FF_LOSS_COLORSPACE
loss due to color space conversion
hardware decoding through VDA
static const char * chroma_location_names[]
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
IEC 61966-2-1 (sRGB or sYCC)
#define FF_DISABLE_DEPRECATION_WARNINGS
common internal and external API header
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
planar GBRA 4:4:4:4 32bpp
planar GBR 4:4:4 27bpp, little-endian
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples */
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
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...
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
ARIB STD-B67, known as "Hybrid log-gamma".
#define FF_LOSS_RESOLUTION
loss due to resolution change
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...
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
#define FF_ENABLE_DEPRECATION_WARNINGS
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Y , 16bpp, little-endian.
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
16 bits gray, 16 bits alpha (little-endian)
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
ITU-R BT2020 for 10-bit system.
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define FF_LOSS_COLORQUANT
loss due to color quantization
AVChromaLocation
Location of chroma samples.
HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer...
planar GBR 4:4:4 48bpp, little-endian
void ff_check_pixfmt_descriptors(void)
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined ...
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to 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.
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
int depth
Number of bits in the component.
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian ...
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure...
planar GBRA 4:4:4:4 64bpp, little-endian
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
AVPixelFormat
Pixel format.
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
planar GBR 4:4:4 30bpp, little-endian
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
int step
Number of elements between 2 horizontally consecutive pixels.
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
"Logarithmic transfer characteristic (100:1 range)"
#define FF_COLOR_GRAY
gray color space
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian