kazan 0.3.9+1.4.359

Vulkan bindings for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
//! <https://registry.khronos.org/vulkan/specs/latest/man/html/vulkan_video_codec_av1std.html>
#![allow(unused_imports)]
use crate::{vk::Result as VkResult, vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::mem::transmute;
use core::ptr;

pub const EXTENSION_NAME: &CStr = c"vulkan_video_codec_av1std";

pub(super) mod defs {
    #![allow(non_camel_case_types, unused_imports)]
    use crate::{vk::*, *};
    use core::ffi::{CStr, c_char, c_int, c_void};
    use core::fmt;
    use core::marker::PhantomData;
    use core::ptr;

    pub const STD_VIDEO_AV1_NUM_REF_FRAMES: u32 = 8;
    pub const STD_VIDEO_AV1_REFS_PER_FRAME: u32 = 7;
    pub const STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME: u32 = 8;
    pub const STD_VIDEO_AV1_MAX_TILE_COLS: u32 = 64;
    pub const STD_VIDEO_AV1_MAX_TILE_ROWS: u32 = 64;
    pub const STD_VIDEO_AV1_MAX_SEGMENTS: u32 = 8;
    pub const STD_VIDEO_AV1_SEG_LVL_MAX: u32 = 8;
    pub const STD_VIDEO_AV1_PRIMARY_REF_NONE: u8 = 7;
    pub const STD_VIDEO_AV1_SELECT_INTEGER_MV: u8 = 2;
    pub const STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS: u32 = 2;
    pub const STD_VIDEO_AV1_SKIP_MODE_FRAMES: u32 = 2;
    pub const STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS: u32 = 4;
    pub const STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS: u32 = 2;
    pub const STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS: u32 = 8;
    pub const STD_VIDEO_AV1_MAX_NUM_PLANES: u32 = 3;
    pub const STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS: u32 = 6;
    pub const STD_VIDEO_AV1_MAX_NUM_Y_POINTS: u32 = 14;
    pub const STD_VIDEO_AV1_MAX_NUM_CB_POINTS: u32 = 10;
    pub const STD_VIDEO_AV1_MAX_NUM_CR_POINTS: u32 = 10;
    pub const STD_VIDEO_AV1_MAX_NUM_POS_LUMA: u32 = 24;
    pub const STD_VIDEO_AV1_MAX_NUM_POS_CHROMA: u32 = 25;

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1ColorConfigFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1ColorConfigFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1ColorConfigFlags {
        #[inline]
        pub fn mono_chrome(mut self, mono_chrome: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, mono_chrome);
            self
        }

        #[inline]
        pub fn color_range(mut self, color_range: bool) -> Self {
            set_bitfield_bool::<1>(&mut self._bitfield_0, color_range);
            self
        }

        #[inline]
        pub fn separate_uv_delta_q(mut self, separate_uv_delta_q: bool) -> Self {
            set_bitfield_bool::<2>(&mut self._bitfield_0, separate_uv_delta_q);
            self
        }

        #[inline]
        pub fn color_description_present_flag(
            mut self,
            color_description_present_flag: bool,
        ) -> Self {
            set_bitfield_bool::<3>(&mut self._bitfield_0, color_description_present_flag);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1ColorConfig.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1ColorConfig {
        pub flags: StdVideoAV1ColorConfigFlags,
        pub bit_depth: u8,
        pub subsampling_x: u8,
        pub subsampling_y: u8,
        pub reserved1: u8,
        pub color_primaries: StdVideoAV1ColorPrimaries,
        pub transfer_characteristics: StdVideoAV1TransferCharacteristics,
        pub matrix_coefficients: StdVideoAV1MatrixCoefficients,
        pub chroma_sample_position: StdVideoAV1ChromaSamplePosition,
    }

    impl StdVideoAV1ColorConfig {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1ColorConfigFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn bit_depth(mut self, bit_depth: u8) -> Self {
            self.bit_depth = bit_depth;
            self
        }

        #[inline]
        pub fn subsampling_x(mut self, subsampling_x: u8) -> Self {
            self.subsampling_x = subsampling_x;
            self
        }

        #[inline]
        pub fn subsampling_y(mut self, subsampling_y: u8) -> Self {
            self.subsampling_y = subsampling_y;
            self
        }

        #[inline]
        pub fn reserved1(mut self, reserved1: u8) -> Self {
            self.reserved1 = reserved1;
            self
        }

        #[inline]
        pub fn color_primaries(mut self, color_primaries: StdVideoAV1ColorPrimaries) -> Self {
            self.color_primaries = color_primaries;
            self
        }

        #[inline]
        pub fn transfer_characteristics(
            mut self,
            transfer_characteristics: StdVideoAV1TransferCharacteristics,
        ) -> Self {
            self.transfer_characteristics = transfer_characteristics;
            self
        }

        #[inline]
        pub fn matrix_coefficients(
            mut self,
            matrix_coefficients: StdVideoAV1MatrixCoefficients,
        ) -> Self {
            self.matrix_coefficients = matrix_coefficients;
            self
        }

        #[inline]
        pub fn chroma_sample_position(
            mut self,
            chroma_sample_position: StdVideoAV1ChromaSamplePosition,
        ) -> Self {
            self.chroma_sample_position = chroma_sample_position;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1TimingInfoFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1TimingInfoFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1TimingInfoFlags {
        #[inline]
        pub fn equal_picture_interval(mut self, equal_picture_interval: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, equal_picture_interval);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1TimingInfo.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1TimingInfo {
        pub flags: StdVideoAV1TimingInfoFlags,
        pub num_units_in_display_tick: u32,
        pub time_scale: u32,
        pub num_ticks_per_picture_minus_1: u32,
    }

    impl StdVideoAV1TimingInfo {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1TimingInfoFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn num_units_in_display_tick(mut self, num_units_in_display_tick: u32) -> Self {
            self.num_units_in_display_tick = num_units_in_display_tick;
            self
        }

        #[inline]
        pub fn time_scale(mut self, time_scale: u32) -> Self {
            self.time_scale = time_scale;
            self
        }

        #[inline]
        pub fn num_ticks_per_picture_minus_1(mut self, num_ticks_per_picture_minus_1: u32) -> Self {
            self.num_ticks_per_picture_minus_1 = num_ticks_per_picture_minus_1;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1SequenceHeaderFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1SequenceHeaderFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1SequenceHeaderFlags {
        #[inline]
        pub fn still_picture(mut self, still_picture: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, still_picture);
            self
        }

        #[inline]
        pub fn reduced_still_picture_header(mut self, reduced_still_picture_header: bool) -> Self {
            set_bitfield_bool::<1>(&mut self._bitfield_0, reduced_still_picture_header);
            self
        }

        #[inline]
        pub fn use_128x128_superblock(mut self, use_128x128_superblock: bool) -> Self {
            set_bitfield_bool::<2>(&mut self._bitfield_0, use_128x128_superblock);
            self
        }

        #[inline]
        pub fn enable_filter_intra(mut self, enable_filter_intra: bool) -> Self {
            set_bitfield_bool::<3>(&mut self._bitfield_0, enable_filter_intra);
            self
        }

        #[inline]
        pub fn enable_intra_edge_filter(mut self, enable_intra_edge_filter: bool) -> Self {
            set_bitfield_bool::<4>(&mut self._bitfield_0, enable_intra_edge_filter);
            self
        }

        #[inline]
        pub fn enable_interintra_compound(mut self, enable_interintra_compound: bool) -> Self {
            set_bitfield_bool::<5>(&mut self._bitfield_0, enable_interintra_compound);
            self
        }

        #[inline]
        pub fn enable_masked_compound(mut self, enable_masked_compound: bool) -> Self {
            set_bitfield_bool::<6>(&mut self._bitfield_0, enable_masked_compound);
            self
        }

        #[inline]
        pub fn enable_warped_motion(mut self, enable_warped_motion: bool) -> Self {
            set_bitfield_bool::<7>(&mut self._bitfield_0, enable_warped_motion);
            self
        }

        #[inline]
        pub fn enable_dual_filter(mut self, enable_dual_filter: bool) -> Self {
            set_bitfield_bool::<8>(&mut self._bitfield_0, enable_dual_filter);
            self
        }

        #[inline]
        pub fn enable_order_hint(mut self, enable_order_hint: bool) -> Self {
            set_bitfield_bool::<9>(&mut self._bitfield_0, enable_order_hint);
            self
        }

        #[inline]
        pub fn enable_jnt_comp(mut self, enable_jnt_comp: bool) -> Self {
            set_bitfield_bool::<10>(&mut self._bitfield_0, enable_jnt_comp);
            self
        }

        #[inline]
        pub fn enable_ref_frame_mvs(mut self, enable_ref_frame_mvs: bool) -> Self {
            set_bitfield_bool::<11>(&mut self._bitfield_0, enable_ref_frame_mvs);
            self
        }

        #[inline]
        pub fn frame_id_numbers_present_flag(
            mut self,
            frame_id_numbers_present_flag: bool,
        ) -> Self {
            set_bitfield_bool::<12>(&mut self._bitfield_0, frame_id_numbers_present_flag);
            self
        }

        #[inline]
        pub fn enable_superres(mut self, enable_superres: bool) -> Self {
            set_bitfield_bool::<13>(&mut self._bitfield_0, enable_superres);
            self
        }

        #[inline]
        pub fn enable_cdef(mut self, enable_cdef: bool) -> Self {
            set_bitfield_bool::<14>(&mut self._bitfield_0, enable_cdef);
            self
        }

        #[inline]
        pub fn enable_restoration(mut self, enable_restoration: bool) -> Self {
            set_bitfield_bool::<15>(&mut self._bitfield_0, enable_restoration);
            self
        }

        #[inline]
        pub fn film_grain_params_present(mut self, film_grain_params_present: bool) -> Self {
            set_bitfield_bool::<16>(&mut self._bitfield_0, film_grain_params_present);
            self
        }

        #[inline]
        pub fn timing_info_present_flag(mut self, timing_info_present_flag: bool) -> Self {
            set_bitfield_bool::<17>(&mut self._bitfield_0, timing_info_present_flag);
            self
        }

        #[inline]
        pub fn initial_display_delay_present_flag(
            mut self,
            initial_display_delay_present_flag: bool,
        ) -> Self {
            set_bitfield_bool::<18>(&mut self._bitfield_0, initial_display_delay_present_flag);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1SequenceHeader.html>
    #[repr(C)]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1SequenceHeader<'a> {
        pub flags: StdVideoAV1SequenceHeaderFlags,
        pub seq_profile: StdVideoAV1Profile,
        pub frame_width_bits_minus_1: u8,
        pub frame_height_bits_minus_1: u8,
        pub max_frame_width_minus_1: u16,
        pub max_frame_height_minus_1: u16,
        pub delta_frame_id_length_minus_2: u8,
        pub additional_frame_id_length_minus_1: u8,
        pub order_hint_bits_minus_1: u8,
        pub seq_force_integer_mv: u8,
        pub seq_force_screen_content_tools: u8,
        pub reserved1: [u8; 5],
        pub p_color_config: *const StdVideoAV1ColorConfig,
        pub p_timing_info: *const StdVideoAV1TimingInfo,
        pub _marker: PhantomData<&'a ()>,
    }

    #[cfg(feature = "debug")]
    impl fmt::Debug for StdVideoAV1SequenceHeader<'_> {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            f.debug_struct("StdVideoAV1SequenceHeader")
                .field("flags", &self.flags)
                .field("seq_profile", &self.seq_profile)
                .field("frame_width_bits_minus_1", &self.frame_width_bits_minus_1)
                .field("frame_height_bits_minus_1", &self.frame_height_bits_minus_1)
                .field("max_frame_width_minus_1", &self.max_frame_width_minus_1)
                .field("max_frame_height_minus_1", &self.max_frame_height_minus_1)
                .field(
                    "delta_frame_id_length_minus_2",
                    &self.delta_frame_id_length_minus_2,
                )
                .field(
                    "additional_frame_id_length_minus_1",
                    &self.additional_frame_id_length_minus_1,
                )
                .field("order_hint_bits_minus_1", &self.order_hint_bits_minus_1)
                .field("seq_force_integer_mv", &self.seq_force_integer_mv)
                .field(
                    "seq_force_screen_content_tools",
                    &self.seq_force_screen_content_tools,
                )
                .field("reserved1", &self.reserved1)
                .field("p_color_config", &self.p_color_config)
                .field("p_timing_info", &self.p_timing_info)
                .finish()
        }
    }

    impl Default for StdVideoAV1SequenceHeader<'_> {
        fn default() -> Self {
            Self {
                flags: Default::default(),
                seq_profile: Default::default(),
                frame_width_bits_minus_1: Default::default(),
                frame_height_bits_minus_1: Default::default(),
                max_frame_width_minus_1: Default::default(),
                max_frame_height_minus_1: Default::default(),
                delta_frame_id_length_minus_2: Default::default(),
                additional_frame_id_length_minus_1: Default::default(),
                order_hint_bits_minus_1: Default::default(),
                seq_force_integer_mv: Default::default(),
                seq_force_screen_content_tools: Default::default(),
                reserved1: [Default::default(); _],
                p_color_config: ptr::null(),
                p_timing_info: ptr::null(),
                _marker: PhantomData,
            }
        }
    }

    impl<'a> StdVideoAV1SequenceHeader<'a> {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1SequenceHeaderFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn seq_profile(mut self, seq_profile: StdVideoAV1Profile) -> Self {
            self.seq_profile = seq_profile;
            self
        }

        #[inline]
        pub fn frame_width_bits_minus_1(mut self, frame_width_bits_minus_1: u8) -> Self {
            self.frame_width_bits_minus_1 = frame_width_bits_minus_1;
            self
        }

        #[inline]
        pub fn frame_height_bits_minus_1(mut self, frame_height_bits_minus_1: u8) -> Self {
            self.frame_height_bits_minus_1 = frame_height_bits_minus_1;
            self
        }

        #[inline]
        pub fn max_frame_width_minus_1(mut self, max_frame_width_minus_1: u16) -> Self {
            self.max_frame_width_minus_1 = max_frame_width_minus_1;
            self
        }

        #[inline]
        pub fn max_frame_height_minus_1(mut self, max_frame_height_minus_1: u16) -> Self {
            self.max_frame_height_minus_1 = max_frame_height_minus_1;
            self
        }

        #[inline]
        pub fn delta_frame_id_length_minus_2(mut self, delta_frame_id_length_minus_2: u8) -> Self {
            self.delta_frame_id_length_minus_2 = delta_frame_id_length_minus_2;
            self
        }

        #[inline]
        pub fn additional_frame_id_length_minus_1(
            mut self,
            additional_frame_id_length_minus_1: u8,
        ) -> Self {
            self.additional_frame_id_length_minus_1 = additional_frame_id_length_minus_1;
            self
        }

        #[inline]
        pub fn order_hint_bits_minus_1(mut self, order_hint_bits_minus_1: u8) -> Self {
            self.order_hint_bits_minus_1 = order_hint_bits_minus_1;
            self
        }

        #[inline]
        pub fn seq_force_integer_mv(mut self, seq_force_integer_mv: u8) -> Self {
            self.seq_force_integer_mv = seq_force_integer_mv;
            self
        }

        #[inline]
        pub fn seq_force_screen_content_tools(
            mut self,
            seq_force_screen_content_tools: u8,
        ) -> Self {
            self.seq_force_screen_content_tools = seq_force_screen_content_tools;
            self
        }

        #[inline]
        pub fn reserved1(mut self, reserved1: [u8; 5]) -> Self {
            self.reserved1 = reserved1;
            self
        }

        #[inline]
        pub fn color_config(mut self, color_config: &'a StdVideoAV1ColorConfig) -> Self {
            self.p_color_config = color_config;
            self
        }

        #[inline]
        pub fn timing_info(mut self, timing_info: &'a StdVideoAV1TimingInfo) -> Self {
            self.p_timing_info = timing_info;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1LoopFilterFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1LoopFilterFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1LoopFilterFlags {
        #[inline]
        pub fn loop_filter_delta_enabled(mut self, loop_filter_delta_enabled: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, loop_filter_delta_enabled);
            self
        }

        #[inline]
        pub fn loop_filter_delta_update(mut self, loop_filter_delta_update: bool) -> Self {
            set_bitfield_bool::<1>(&mut self._bitfield_0, loop_filter_delta_update);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1LoopFilter.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1LoopFilter {
        pub flags: StdVideoAV1LoopFilterFlags,
        pub loop_filter_level: [u8; STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS as usize],
        pub loop_filter_sharpness: u8,
        pub update_ref_delta: u8,
        pub loop_filter_ref_deltas: [i8; STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME as usize],
        pub update_mode_delta: u8,
        pub loop_filter_mode_deltas: [i8; STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS as usize],
    }

    impl Default for StdVideoAV1LoopFilter {
        fn default() -> Self {
            Self {
                flags: Default::default(),
                loop_filter_level: [Default::default(); _],
                loop_filter_sharpness: Default::default(),
                update_ref_delta: Default::default(),
                loop_filter_ref_deltas: [Default::default(); _],
                update_mode_delta: Default::default(),
                loop_filter_mode_deltas: [Default::default(); _],
            }
        }
    }

    impl StdVideoAV1LoopFilter {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1LoopFilterFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn loop_filter_level(
            mut self,
            loop_filter_level: [u8; STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS as usize],
        ) -> Self {
            self.loop_filter_level = loop_filter_level;
            self
        }

        #[inline]
        pub fn loop_filter_sharpness(mut self, loop_filter_sharpness: u8) -> Self {
            self.loop_filter_sharpness = loop_filter_sharpness;
            self
        }

        #[inline]
        pub fn update_ref_delta(mut self, update_ref_delta: u8) -> Self {
            self.update_ref_delta = update_ref_delta;
            self
        }

        #[inline]
        pub fn loop_filter_ref_deltas(
            mut self,
            loop_filter_ref_deltas: [i8; STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME as usize],
        ) -> Self {
            self.loop_filter_ref_deltas = loop_filter_ref_deltas;
            self
        }

        #[inline]
        pub fn update_mode_delta(mut self, update_mode_delta: u8) -> Self {
            self.update_mode_delta = update_mode_delta;
            self
        }

        #[inline]
        pub fn loop_filter_mode_deltas(
            mut self,
            loop_filter_mode_deltas: [i8; STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS as usize],
        ) -> Self {
            self.loop_filter_mode_deltas = loop_filter_mode_deltas;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1QuantizationFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1QuantizationFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1QuantizationFlags {
        #[inline]
        pub fn using_qmatrix(mut self, using_qmatrix: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, using_qmatrix);
            self
        }

        #[inline]
        pub fn diff_uv_delta(mut self, diff_uv_delta: bool) -> Self {
            set_bitfield_bool::<1>(&mut self._bitfield_0, diff_uv_delta);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1Quantization.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1Quantization {
        pub flags: StdVideoAV1QuantizationFlags,
        pub base_q_idx: u8,
        pub delta_qy_dc: i8,
        pub delta_qu_dc: i8,
        pub delta_qu_ac: i8,
        pub delta_qv_dc: i8,
        pub delta_qv_ac: i8,
        pub qm_y: u8,
        pub qm_u: u8,
        pub qm_v: u8,
    }

    impl StdVideoAV1Quantization {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1QuantizationFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn base_q_idx(mut self, base_q_idx: u8) -> Self {
            self.base_q_idx = base_q_idx;
            self
        }

        #[inline]
        pub fn delta_qy_dc(mut self, delta_qy_dc: i8) -> Self {
            self.delta_qy_dc = delta_qy_dc;
            self
        }

        #[inline]
        pub fn delta_qu_dc(mut self, delta_qu_dc: i8) -> Self {
            self.delta_qu_dc = delta_qu_dc;
            self
        }

        #[inline]
        pub fn delta_qu_ac(mut self, delta_qu_ac: i8) -> Self {
            self.delta_qu_ac = delta_qu_ac;
            self
        }

        #[inline]
        pub fn delta_qv_dc(mut self, delta_qv_dc: i8) -> Self {
            self.delta_qv_dc = delta_qv_dc;
            self
        }

        #[inline]
        pub fn delta_qv_ac(mut self, delta_qv_ac: i8) -> Self {
            self.delta_qv_ac = delta_qv_ac;
            self
        }

        #[inline]
        pub fn qm_y(mut self, qm_y: u8) -> Self {
            self.qm_y = qm_y;
            self
        }

        #[inline]
        pub fn qm_u(mut self, qm_u: u8) -> Self {
            self.qm_u = qm_u;
            self
        }

        #[inline]
        pub fn qm_v(mut self, qm_v: u8) -> Self {
            self.qm_v = qm_v;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1Segmentation.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1Segmentation {
        pub feature_enabled: [u8; STD_VIDEO_AV1_MAX_SEGMENTS as usize],
        pub feature_data:
            [[i16; STD_VIDEO_AV1_SEG_LVL_MAX as usize]; STD_VIDEO_AV1_MAX_SEGMENTS as usize],
    }

    impl Default for StdVideoAV1Segmentation {
        fn default() -> Self {
            Self {
                feature_enabled: [Default::default(); _],
                feature_data: [[Default::default(); _]; _],
            }
        }
    }

    impl StdVideoAV1Segmentation {
        #[inline]
        pub fn feature_enabled(
            mut self,
            feature_enabled: [u8; STD_VIDEO_AV1_MAX_SEGMENTS as usize],
        ) -> Self {
            self.feature_enabled = feature_enabled;
            self
        }

        #[inline]
        pub fn feature_data(
            mut self,
            feature_data: [[i16; STD_VIDEO_AV1_SEG_LVL_MAX as usize];
                STD_VIDEO_AV1_MAX_SEGMENTS as usize],
        ) -> Self {
            self.feature_data = feature_data;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1TileInfoFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1TileInfoFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1TileInfoFlags {
        #[inline]
        pub fn uniform_tile_spacing_flag(mut self, uniform_tile_spacing_flag: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, uniform_tile_spacing_flag);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1TileInfo.html>
    #[repr(C)]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1TileInfo<'a> {
        pub flags: StdVideoAV1TileInfoFlags,
        pub tile_cols: u8,
        pub tile_rows: u8,
        pub context_update_tile_id: u16,
        pub tile_size_bytes_minus_1: u8,
        pub reserved1: [u8; 7],
        pub p_mi_col_starts: *const u16,
        pub p_mi_row_starts: *const u16,
        pub p_width_in_sbs_minus1: *const u16,
        pub p_height_in_sbs_minus1: *const u16,
        pub _marker: PhantomData<&'a ()>,
    }

    #[cfg(feature = "debug")]
    impl fmt::Debug for StdVideoAV1TileInfo<'_> {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            f.debug_struct("StdVideoAV1TileInfo")
                .field("flags", &self.flags)
                .field("tile_cols", &self.tile_cols)
                .field("tile_rows", &self.tile_rows)
                .field("context_update_tile_id", &self.context_update_tile_id)
                .field("tile_size_bytes_minus_1", &self.tile_size_bytes_minus_1)
                .field("reserved1", &self.reserved1)
                .field("p_mi_col_starts", &self.p_mi_col_starts)
                .field("p_mi_row_starts", &self.p_mi_row_starts)
                .field("p_width_in_sbs_minus1", &self.p_width_in_sbs_minus1)
                .field("p_height_in_sbs_minus1", &self.p_height_in_sbs_minus1)
                .finish()
        }
    }

    impl Default for StdVideoAV1TileInfo<'_> {
        fn default() -> Self {
            Self {
                flags: Default::default(),
                tile_cols: Default::default(),
                tile_rows: Default::default(),
                context_update_tile_id: Default::default(),
                tile_size_bytes_minus_1: Default::default(),
                reserved1: [Default::default(); _],
                p_mi_col_starts: ptr::null(),
                p_mi_row_starts: ptr::null(),
                p_width_in_sbs_minus1: ptr::null(),
                p_height_in_sbs_minus1: ptr::null(),
                _marker: PhantomData,
            }
        }
    }

    impl<'a> StdVideoAV1TileInfo<'a> {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1TileInfoFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn tile_cols(
            mut self,
            mi_col_starts: &'a [u16],
            width_in_sbs_minus1: &'a [u16],
        ) -> Self {
            self.tile_cols = mi_col_starts.len().try_into().unwrap();
            assert_eq!(width_in_sbs_minus1.len(), self.tile_cols as usize);
            self.p_mi_col_starts = mi_col_starts.as_ptr() as _;
            self.p_width_in_sbs_minus1 = width_in_sbs_minus1.as_ptr() as _;
            self
        }

        #[inline]
        pub fn tile_rows(
            mut self,
            mi_row_starts: &'a [u16],
            height_in_sbs_minus1: &'a [u16],
        ) -> Self {
            self.tile_rows = mi_row_starts.len().try_into().unwrap();
            assert_eq!(height_in_sbs_minus1.len(), self.tile_rows as usize);
            self.p_mi_row_starts = mi_row_starts.as_ptr() as _;
            self.p_height_in_sbs_minus1 = height_in_sbs_minus1.as_ptr() as _;
            self
        }

        #[inline]
        pub fn context_update_tile_id(mut self, context_update_tile_id: u16) -> Self {
            self.context_update_tile_id = context_update_tile_id;
            self
        }

        #[inline]
        pub fn tile_size_bytes_minus_1(mut self, tile_size_bytes_minus_1: u8) -> Self {
            self.tile_size_bytes_minus_1 = tile_size_bytes_minus_1;
            self
        }

        #[inline]
        pub fn reserved1(mut self, reserved1: [u8; 7]) -> Self {
            self.reserved1 = reserved1;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1CDEF.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1CDEF {
        pub cdef_damping_minus_3: u8,
        pub cdef_bits: u8,
        pub cdef_y_pri_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        pub cdef_y_sec_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        pub cdef_uv_pri_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        pub cdef_uv_sec_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
    }

    impl Default for StdVideoAV1CDEF {
        fn default() -> Self {
            Self {
                cdef_damping_minus_3: Default::default(),
                cdef_bits: Default::default(),
                cdef_y_pri_strength: [Default::default(); _],
                cdef_y_sec_strength: [Default::default(); _],
                cdef_uv_pri_strength: [Default::default(); _],
                cdef_uv_sec_strength: [Default::default(); _],
            }
        }
    }

    impl StdVideoAV1CDEF {
        #[inline]
        pub fn cdef_damping_minus_3(mut self, cdef_damping_minus_3: u8) -> Self {
            self.cdef_damping_minus_3 = cdef_damping_minus_3;
            self
        }

        #[inline]
        pub fn cdef_bits(mut self, cdef_bits: u8) -> Self {
            self.cdef_bits = cdef_bits;
            self
        }

        #[inline]
        pub fn cdef_y_pri_strength(
            mut self,
            cdef_y_pri_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        ) -> Self {
            self.cdef_y_pri_strength = cdef_y_pri_strength;
            self
        }

        #[inline]
        pub fn cdef_y_sec_strength(
            mut self,
            cdef_y_sec_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        ) -> Self {
            self.cdef_y_sec_strength = cdef_y_sec_strength;
            self
        }

        #[inline]
        pub fn cdef_uv_pri_strength(
            mut self,
            cdef_uv_pri_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        ) -> Self {
            self.cdef_uv_pri_strength = cdef_uv_pri_strength;
            self
        }

        #[inline]
        pub fn cdef_uv_sec_strength(
            mut self,
            cdef_uv_sec_strength: [u8; STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS as usize],
        ) -> Self {
            self.cdef_uv_sec_strength = cdef_uv_sec_strength;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1LoopRestoration.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1LoopRestoration {
        pub frame_restoration_type:
            [StdVideoAV1FrameRestorationType; STD_VIDEO_AV1_MAX_NUM_PLANES as usize],
        pub loop_restoration_size: [u16; STD_VIDEO_AV1_MAX_NUM_PLANES as usize],
    }

    impl Default for StdVideoAV1LoopRestoration {
        fn default() -> Self {
            Self {
                frame_restoration_type: [Default::default(); _],
                loop_restoration_size: [Default::default(); _],
            }
        }
    }

    impl StdVideoAV1LoopRestoration {
        #[inline]
        pub fn frame_restoration_type(
            mut self,
            frame_restoration_type: [StdVideoAV1FrameRestorationType;
                STD_VIDEO_AV1_MAX_NUM_PLANES as usize],
        ) -> Self {
            self.frame_restoration_type = frame_restoration_type;
            self
        }

        #[inline]
        pub fn loop_restoration_size(
            mut self,
            loop_restoration_size: [u16; STD_VIDEO_AV1_MAX_NUM_PLANES as usize],
        ) -> Self {
            self.loop_restoration_size = loop_restoration_size;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1GlobalMotion.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1GlobalMotion {
        pub gm_type: [u8; STD_VIDEO_AV1_NUM_REF_FRAMES as usize],
        pub gm_params: [[i32; STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS as usize];
            STD_VIDEO_AV1_NUM_REF_FRAMES as usize],
    }

    impl Default for StdVideoAV1GlobalMotion {
        fn default() -> Self {
            Self {
                gm_type: [Default::default(); _],
                gm_params: [[Default::default(); _]; _],
            }
        }
    }

    impl StdVideoAV1GlobalMotion {
        #[inline]
        pub fn gm_type(mut self, gm_type: [u8; STD_VIDEO_AV1_NUM_REF_FRAMES as usize]) -> Self {
            self.gm_type = gm_type;
            self
        }

        #[inline]
        pub fn gm_params(
            mut self,
            gm_params: [[i32; STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS as usize];
                STD_VIDEO_AV1_NUM_REF_FRAMES as usize],
        ) -> Self {
            self.gm_params = gm_params;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1FilmGrainFlags.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone, Default)]
    #[must_use]
    pub struct StdVideoAV1FilmGrainFlags {
        pub _bitfield_0: u32,
    }

    impl StdVideoAV1FilmGrainFlags {
        #[inline]
        pub fn chroma_scaling_from_luma(mut self, chroma_scaling_from_luma: bool) -> Self {
            set_bitfield_bool::<0>(&mut self._bitfield_0, chroma_scaling_from_luma);
            self
        }

        #[inline]
        pub fn overlap_flag(mut self, overlap_flag: bool) -> Self {
            set_bitfield_bool::<1>(&mut self._bitfield_0, overlap_flag);
            self
        }

        #[inline]
        pub fn clip_to_restricted_range(mut self, clip_to_restricted_range: bool) -> Self {
            set_bitfield_bool::<2>(&mut self._bitfield_0, clip_to_restricted_range);
            self
        }

        #[inline]
        pub fn update_grain(mut self, update_grain: bool) -> Self {
            set_bitfield_bool::<3>(&mut self._bitfield_0, update_grain);
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1FilmGrain.html>
    #[repr(C)]
    #[cfg_attr(feature = "debug", derive(Debug))]
    #[derive(Copy, Clone)]
    #[must_use]
    pub struct StdVideoAV1FilmGrain {
        pub flags: StdVideoAV1FilmGrainFlags,
        pub grain_scaling_minus_8: u8,
        pub ar_coeff_lag: u8,
        pub ar_coeff_shift_minus_6: u8,
        pub grain_scale_shift: u8,
        pub grain_seed: u16,
        pub film_grain_params_ref_idx: u8,
        pub num_y_points: u8,
        pub point_y_value: [u8; STD_VIDEO_AV1_MAX_NUM_Y_POINTS as usize],
        pub point_y_scaling: [u8; STD_VIDEO_AV1_MAX_NUM_Y_POINTS as usize],
        pub num_cb_points: u8,
        pub point_cb_value: [u8; STD_VIDEO_AV1_MAX_NUM_CB_POINTS as usize],
        pub point_cb_scaling: [u8; STD_VIDEO_AV1_MAX_NUM_CB_POINTS as usize],
        pub num_cr_points: u8,
        pub point_cr_value: [u8; STD_VIDEO_AV1_MAX_NUM_CR_POINTS as usize],
        pub point_cr_scaling: [u8; STD_VIDEO_AV1_MAX_NUM_CR_POINTS as usize],
        pub ar_coeffs_y_plus_128: [i8; STD_VIDEO_AV1_MAX_NUM_POS_LUMA as usize],
        pub ar_coeffs_cb_plus_128: [i8; STD_VIDEO_AV1_MAX_NUM_POS_CHROMA as usize],
        pub ar_coeffs_cr_plus_128: [i8; STD_VIDEO_AV1_MAX_NUM_POS_CHROMA as usize],
        pub cb_mult: u8,
        pub cb_luma_mult: u8,
        pub cb_offset: u16,
        pub cr_mult: u8,
        pub cr_luma_mult: u8,
        pub cr_offset: u16,
    }

    impl Default for StdVideoAV1FilmGrain {
        fn default() -> Self {
            Self {
                flags: Default::default(),
                grain_scaling_minus_8: Default::default(),
                ar_coeff_lag: Default::default(),
                ar_coeff_shift_minus_6: Default::default(),
                grain_scale_shift: Default::default(),
                grain_seed: Default::default(),
                film_grain_params_ref_idx: Default::default(),
                num_y_points: Default::default(),
                point_y_value: [Default::default(); _],
                point_y_scaling: [Default::default(); _],
                num_cb_points: Default::default(),
                point_cb_value: [Default::default(); _],
                point_cb_scaling: [Default::default(); _],
                num_cr_points: Default::default(),
                point_cr_value: [Default::default(); _],
                point_cr_scaling: [Default::default(); _],
                ar_coeffs_y_plus_128: [Default::default(); _],
                ar_coeffs_cb_plus_128: [Default::default(); _],
                ar_coeffs_cr_plus_128: [Default::default(); _],
                cb_mult: Default::default(),
                cb_luma_mult: Default::default(),
                cb_offset: Default::default(),
                cr_mult: Default::default(),
                cr_luma_mult: Default::default(),
                cr_offset: Default::default(),
            }
        }
    }

    impl StdVideoAV1FilmGrain {
        #[inline]
        pub fn flags(mut self, flags: StdVideoAV1FilmGrainFlags) -> Self {
            self.flags = flags;
            self
        }

        #[inline]
        pub fn grain_scaling_minus_8(mut self, grain_scaling_minus_8: u8) -> Self {
            self.grain_scaling_minus_8 = grain_scaling_minus_8;
            self
        }

        #[inline]
        pub fn ar_coeff_lag(mut self, ar_coeff_lag: u8) -> Self {
            self.ar_coeff_lag = ar_coeff_lag;
            self
        }

        #[inline]
        pub fn ar_coeff_shift_minus_6(mut self, ar_coeff_shift_minus_6: u8) -> Self {
            self.ar_coeff_shift_minus_6 = ar_coeff_shift_minus_6;
            self
        }

        #[inline]
        pub fn grain_scale_shift(mut self, grain_scale_shift: u8) -> Self {
            self.grain_scale_shift = grain_scale_shift;
            self
        }

        #[inline]
        pub fn grain_seed(mut self, grain_seed: u16) -> Self {
            self.grain_seed = grain_seed;
            self
        }

        #[inline]
        pub fn film_grain_params_ref_idx(mut self, film_grain_params_ref_idx: u8) -> Self {
            self.film_grain_params_ref_idx = film_grain_params_ref_idx;
            self
        }

        #[inline]
        pub fn num_y_points(mut self, num_y_points: u8) -> Self {
            self.num_y_points = num_y_points;
            self
        }

        #[inline]
        pub fn point_y_value(
            mut self,
            point_y_value: [u8; STD_VIDEO_AV1_MAX_NUM_Y_POINTS as usize],
        ) -> Self {
            self.point_y_value = point_y_value;
            self
        }

        #[inline]
        pub fn point_y_scaling(
            mut self,
            point_y_scaling: [u8; STD_VIDEO_AV1_MAX_NUM_Y_POINTS as usize],
        ) -> Self {
            self.point_y_scaling = point_y_scaling;
            self
        }

        #[inline]
        pub fn num_cb_points(mut self, num_cb_points: u8) -> Self {
            self.num_cb_points = num_cb_points;
            self
        }

        #[inline]
        pub fn point_cb_value(
            mut self,
            point_cb_value: [u8; STD_VIDEO_AV1_MAX_NUM_CB_POINTS as usize],
        ) -> Self {
            self.point_cb_value = point_cb_value;
            self
        }

        #[inline]
        pub fn point_cb_scaling(
            mut self,
            point_cb_scaling: [u8; STD_VIDEO_AV1_MAX_NUM_CB_POINTS as usize],
        ) -> Self {
            self.point_cb_scaling = point_cb_scaling;
            self
        }

        #[inline]
        pub fn num_cr_points(mut self, num_cr_points: u8) -> Self {
            self.num_cr_points = num_cr_points;
            self
        }

        #[inline]
        pub fn point_cr_value(
            mut self,
            point_cr_value: [u8; STD_VIDEO_AV1_MAX_NUM_CR_POINTS as usize],
        ) -> Self {
            self.point_cr_value = point_cr_value;
            self
        }

        #[inline]
        pub fn point_cr_scaling(
            mut self,
            point_cr_scaling: [u8; STD_VIDEO_AV1_MAX_NUM_CR_POINTS as usize],
        ) -> Self {
            self.point_cr_scaling = point_cr_scaling;
            self
        }

        #[inline]
        pub fn ar_coeffs_y_plus_128(
            mut self,
            ar_coeffs_y_plus_128: [i8; STD_VIDEO_AV1_MAX_NUM_POS_LUMA as usize],
        ) -> Self {
            self.ar_coeffs_y_plus_128 = ar_coeffs_y_plus_128;
            self
        }

        #[inline]
        pub fn ar_coeffs_cb_plus_128(
            mut self,
            ar_coeffs_cb_plus_128: [i8; STD_VIDEO_AV1_MAX_NUM_POS_CHROMA as usize],
        ) -> Self {
            self.ar_coeffs_cb_plus_128 = ar_coeffs_cb_plus_128;
            self
        }

        #[inline]
        pub fn ar_coeffs_cr_plus_128(
            mut self,
            ar_coeffs_cr_plus_128: [i8; STD_VIDEO_AV1_MAX_NUM_POS_CHROMA as usize],
        ) -> Self {
            self.ar_coeffs_cr_plus_128 = ar_coeffs_cr_plus_128;
            self
        }

        #[inline]
        pub fn cb_mult(mut self, cb_mult: u8) -> Self {
            self.cb_mult = cb_mult;
            self
        }

        #[inline]
        pub fn cb_luma_mult(mut self, cb_luma_mult: u8) -> Self {
            self.cb_luma_mult = cb_luma_mult;
            self
        }

        #[inline]
        pub fn cb_offset(mut self, cb_offset: u16) -> Self {
            self.cb_offset = cb_offset;
            self
        }

        #[inline]
        pub fn cr_mult(mut self, cr_mult: u8) -> Self {
            self.cr_mult = cr_mult;
            self
        }

        #[inline]
        pub fn cr_luma_mult(mut self, cr_luma_mult: u8) -> Self {
            self.cr_luma_mult = cr_luma_mult;
            self
        }

        #[inline]
        pub fn cr_offset(mut self, cr_offset: u16) -> Self {
            self.cr_offset = cr_offset;
            self
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1Profile.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1Profile(i32);

    impl StdVideoAV1Profile {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const MAIN: Self = Self(0);
        pub const HIGH: Self = Self(1);
        pub const PROFESSIONAL: Self = Self(2);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1Profile {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::MAIN => Some("MAIN"),
                Self::HIGH => Some("HIGH"),
                Self::PROFESSIONAL => Some("PROFESSIONAL"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1Level.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1Level(i32);

    impl StdVideoAV1Level {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const _2_0: Self = Self(0);
        pub const _2_1: Self = Self(1);
        pub const _2_2: Self = Self(2);
        pub const _2_3: Self = Self(3);
        pub const _3_0: Self = Self(4);
        pub const _3_1: Self = Self(5);
        pub const _3_2: Self = Self(6);
        pub const _3_3: Self = Self(7);
        pub const _4_0: Self = Self(8);
        pub const _4_1: Self = Self(9);
        pub const _4_2: Self = Self(10);
        pub const _4_3: Self = Self(11);
        pub const _5_0: Self = Self(12);
        pub const _5_1: Self = Self(13);
        pub const _5_2: Self = Self(14);
        pub const _5_3: Self = Self(15);
        pub const _6_0: Self = Self(16);
        pub const _6_1: Self = Self(17);
        pub const _6_2: Self = Self(18);
        pub const _6_3: Self = Self(19);
        pub const _7_0: Self = Self(20);
        pub const _7_1: Self = Self(21);
        pub const _7_2: Self = Self(22);
        pub const _7_3: Self = Self(23);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1Level {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::_2_0 => Some("_2_0"),
                Self::_2_1 => Some("_2_1"),
                Self::_2_2 => Some("_2_2"),
                Self::_2_3 => Some("_2_3"),
                Self::_3_0 => Some("_3_0"),
                Self::_3_1 => Some("_3_1"),
                Self::_3_2 => Some("_3_2"),
                Self::_3_3 => Some("_3_3"),
                Self::_4_0 => Some("_4_0"),
                Self::_4_1 => Some("_4_1"),
                Self::_4_2 => Some("_4_2"),
                Self::_4_3 => Some("_4_3"),
                Self::_5_0 => Some("_5_0"),
                Self::_5_1 => Some("_5_1"),
                Self::_5_2 => Some("_5_2"),
                Self::_5_3 => Some("_5_3"),
                Self::_6_0 => Some("_6_0"),
                Self::_6_1 => Some("_6_1"),
                Self::_6_2 => Some("_6_2"),
                Self::_6_3 => Some("_6_3"),
                Self::_7_0 => Some("_7_0"),
                Self::_7_1 => Some("_7_1"),
                Self::_7_2 => Some("_7_2"),
                Self::_7_3 => Some("_7_3"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1FrameType.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1FrameType(i32);

    impl StdVideoAV1FrameType {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const KEY: Self = Self(0);
        pub const INTER: Self = Self(1);
        pub const INTRA_ONLY: Self = Self(2);
        pub const SWITCH: Self = Self(3);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1FrameType {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::KEY => Some("KEY"),
                Self::INTER => Some("INTER"),
                Self::INTRA_ONLY => Some("INTRA_ONLY"),
                Self::SWITCH => Some("SWITCH"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1ReferenceName.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1ReferenceName(i32);

    impl StdVideoAV1ReferenceName {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const INTRA_FRAME: Self = Self(0);
        pub const LAST_FRAME: Self = Self(1);
        pub const LAST2_FRAME: Self = Self(2);
        pub const LAST3_FRAME: Self = Self(3);
        pub const GOLDEN_FRAME: Self = Self(4);
        pub const BWDREF_FRAME: Self = Self(5);
        pub const ALTREF2_FRAME: Self = Self(6);
        pub const ALTREF_FRAME: Self = Self(7);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1ReferenceName {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::INTRA_FRAME => Some("INTRA_FRAME"),
                Self::LAST_FRAME => Some("LAST_FRAME"),
                Self::LAST2_FRAME => Some("LAST2_FRAME"),
                Self::LAST3_FRAME => Some("LAST3_FRAME"),
                Self::GOLDEN_FRAME => Some("GOLDEN_FRAME"),
                Self::BWDREF_FRAME => Some("BWDREF_FRAME"),
                Self::ALTREF2_FRAME => Some("ALTREF2_FRAME"),
                Self::ALTREF_FRAME => Some("ALTREF_FRAME"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1InterpolationFilter.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1InterpolationFilter(i32);

    impl StdVideoAV1InterpolationFilter {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const EIGHTTAP: Self = Self(0);
        pub const EIGHTTAP_SMOOTH: Self = Self(1);
        pub const EIGHTTAP_SHARP: Self = Self(2);
        pub const BILINEAR: Self = Self(3);
        pub const SWITCHABLE: Self = Self(4);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1InterpolationFilter {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::EIGHTTAP => Some("EIGHTTAP"),
                Self::EIGHTTAP_SMOOTH => Some("EIGHTTAP_SMOOTH"),
                Self::EIGHTTAP_SHARP => Some("EIGHTTAP_SHARP"),
                Self::BILINEAR => Some("BILINEAR"),
                Self::SWITCHABLE => Some("SWITCHABLE"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1TxMode.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1TxMode(i32);

    impl StdVideoAV1TxMode {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const ONLY_4X4: Self = Self(0);
        pub const LARGEST: Self = Self(1);
        pub const SELECT: Self = Self(2);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1TxMode {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::ONLY_4X4 => Some("ONLY_4X4"),
                Self::LARGEST => Some("LARGEST"),
                Self::SELECT => Some("SELECT"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1FrameRestorationType.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1FrameRestorationType(i32);

    impl StdVideoAV1FrameRestorationType {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const NONE: Self = Self(0);
        pub const WIENER: Self = Self(1);
        pub const SGRPROJ: Self = Self(2);
        pub const SWITCHABLE: Self = Self(3);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1FrameRestorationType {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::NONE => Some("NONE"),
                Self::WIENER => Some("WIENER"),
                Self::SGRPROJ => Some("SGRPROJ"),
                Self::SWITCHABLE => Some("SWITCHABLE"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1ColorPrimaries.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1ColorPrimaries(i32);

    impl StdVideoAV1ColorPrimaries {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const BT_709: Self = Self(1);
        pub const UNSPECIFIED: Self = Self(2);
        pub const BT_470_M: Self = Self(4);
        pub const BT_470_B_G: Self = Self(5);
        pub const BT_601: Self = Self(6);
        pub const SMPTE_240: Self = Self(7);
        pub const GENERIC_FILM: Self = Self(8);
        pub const BT_2020: Self = Self(9);
        pub const XYZ: Self = Self(10);
        pub const SMPTE_431: Self = Self(11);
        pub const SMPTE_432: Self = Self(12);
        pub const EBU_3213: Self = Self(22);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1ColorPrimaries {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::BT_709 => Some("BT_709"),
                Self::UNSPECIFIED => Some("UNSPECIFIED"),
                Self::BT_470_M => Some("BT_470_M"),
                Self::BT_470_B_G => Some("BT_470_B_G"),
                Self::BT_601 => Some("BT_601"),
                Self::SMPTE_240 => Some("SMPTE_240"),
                Self::GENERIC_FILM => Some("GENERIC_FILM"),
                Self::BT_2020 => Some("BT_2020"),
                Self::XYZ => Some("XYZ"),
                Self::SMPTE_431 => Some("SMPTE_431"),
                Self::SMPTE_432 => Some("SMPTE_432"),
                Self::EBU_3213 => Some("EBU_3213"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1TransferCharacteristics.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1TransferCharacteristics(i32);

    impl StdVideoAV1TransferCharacteristics {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const RESERVED_0: Self = Self(0);
        pub const BT_709: Self = Self(1);
        pub const UNSPECIFIED: Self = Self(2);
        pub const RESERVED_3: Self = Self(3);
        pub const BT_470_M: Self = Self(4);
        pub const BT_470_B_G: Self = Self(5);
        pub const BT_601: Self = Self(6);
        pub const SMPTE_240: Self = Self(7);
        pub const LINEAR: Self = Self(8);
        pub const LOG_100: Self = Self(9);
        pub const LOG_100_SQRT10: Self = Self(10);
        pub const IEC_61966: Self = Self(11);
        pub const BT_1361: Self = Self(12);
        pub const SRGB: Self = Self(13);
        pub const BT_2020_10_BIT: Self = Self(14);
        pub const BT_2020_12_BIT: Self = Self(15);
        pub const SMPTE_2084: Self = Self(16);
        pub const SMPTE_428: Self = Self(17);
        pub const HLG: Self = Self(18);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1TransferCharacteristics {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::RESERVED_0 => Some("RESERVED_0"),
                Self::BT_709 => Some("BT_709"),
                Self::UNSPECIFIED => Some("UNSPECIFIED"),
                Self::RESERVED_3 => Some("RESERVED_3"),
                Self::BT_470_M => Some("BT_470_M"),
                Self::BT_470_B_G => Some("BT_470_B_G"),
                Self::BT_601 => Some("BT_601"),
                Self::SMPTE_240 => Some("SMPTE_240"),
                Self::LINEAR => Some("LINEAR"),
                Self::LOG_100 => Some("LOG_100"),
                Self::LOG_100_SQRT10 => Some("LOG_100_SQRT10"),
                Self::IEC_61966 => Some("IEC_61966"),
                Self::BT_1361 => Some("BT_1361"),
                Self::SRGB => Some("SRGB"),
                Self::BT_2020_10_BIT => Some("BT_2020_10_BIT"),
                Self::BT_2020_12_BIT => Some("BT_2020_12_BIT"),
                Self::SMPTE_2084 => Some("SMPTE_2084"),
                Self::SMPTE_428 => Some("SMPTE_428"),
                Self::HLG => Some("HLG"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1MatrixCoefficients.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1MatrixCoefficients(i32);

    impl StdVideoAV1MatrixCoefficients {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const IDENTITY: Self = Self(0);
        pub const BT_709: Self = Self(1);
        pub const UNSPECIFIED: Self = Self(2);
        pub const RESERVED_3: Self = Self(3);
        pub const FCC: Self = Self(4);
        pub const BT_470_B_G: Self = Self(5);
        pub const BT_601: Self = Self(6);
        pub const SMPTE_240: Self = Self(7);
        pub const SMPTE_YCGCO: Self = Self(8);
        pub const BT_2020_NCL: Self = Self(9);
        pub const BT_2020_CL: Self = Self(10);
        pub const SMPTE_2085: Self = Self(11);
        pub const CHROMAT_NCL: Self = Self(12);
        pub const CHROMAT_CL: Self = Self(13);
        pub const ICTCP: Self = Self(14);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1MatrixCoefficients {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::IDENTITY => Some("IDENTITY"),
                Self::BT_709 => Some("BT_709"),
                Self::UNSPECIFIED => Some("UNSPECIFIED"),
                Self::RESERVED_3 => Some("RESERVED_3"),
                Self::FCC => Some("FCC"),
                Self::BT_470_B_G => Some("BT_470_B_G"),
                Self::BT_601 => Some("BT_601"),
                Self::SMPTE_240 => Some("SMPTE_240"),
                Self::SMPTE_YCGCO => Some("SMPTE_YCGCO"),
                Self::BT_2020_NCL => Some("BT_2020_NCL"),
                Self::BT_2020_CL => Some("BT_2020_CL"),
                Self::SMPTE_2085 => Some("SMPTE_2085"),
                Self::CHROMAT_NCL => Some("CHROMAT_NCL"),
                Self::CHROMAT_CL => Some("CHROMAT_CL"),
                Self::ICTCP => Some("ICTCP"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }

    /// <https://registry.khronos.org/vulkan/specs/latest/man/html/StdVideoAV1ChromaSamplePosition.html>
    #[repr(transparent)]
    #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct StdVideoAV1ChromaSamplePosition(i32);

    impl StdVideoAV1ChromaSamplePosition {
        #[inline]
        pub const fn from_raw(x: i32) -> Self {
            Self(x)
        }
        #[inline]
        pub const fn as_raw(self) -> i32 {
            self.0
        }

        pub const UNKNOWN: Self = Self(0);
        pub const VERTICAL: Self = Self(1);
        pub const COLOCATED: Self = Self(2);
        pub const RESERVED: Self = Self(3);
        pub const INVALID: Self = Self(0x7FFFFFFF);
    }

    impl fmt::Debug for StdVideoAV1ChromaSamplePosition {
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            let name = match *self {
                Self::UNKNOWN => Some("UNKNOWN"),
                Self::VERTICAL => Some("VERTICAL"),
                Self::COLOCATED => Some("COLOCATED"),
                Self::RESERVED => Some("RESERVED"),
                Self::INVALID => Some("INVALID"),
                _ => None,
            };
            if let Some(name) = name {
                f.write_str(name)
            } else {
                self.0.fmt(f)
            }
        }
    }
}

#[cfg(feature = "ffi")]
pub(super) mod ffi {
    #![allow(non_camel_case_types)]
    use super::defs::*;

    pub type StdVideoAV1ColorConfigFlags = super::defs::StdVideoAV1ColorConfigFlags;
    pub type StdVideoAV1ColorConfig = super::defs::StdVideoAV1ColorConfig;
    pub type StdVideoAV1TimingInfoFlags = super::defs::StdVideoAV1TimingInfoFlags;
    pub type StdVideoAV1TimingInfo = super::defs::StdVideoAV1TimingInfo;
    pub type StdVideoAV1SequenceHeaderFlags = super::defs::StdVideoAV1SequenceHeaderFlags;
    pub type StdVideoAV1SequenceHeader = super::defs::StdVideoAV1SequenceHeader<'static>;
    pub type StdVideoAV1LoopFilterFlags = super::defs::StdVideoAV1LoopFilterFlags;
    pub type StdVideoAV1LoopFilter = super::defs::StdVideoAV1LoopFilter;
    pub type StdVideoAV1QuantizationFlags = super::defs::StdVideoAV1QuantizationFlags;
    pub type StdVideoAV1Quantization = super::defs::StdVideoAV1Quantization;
    pub type StdVideoAV1Segmentation = super::defs::StdVideoAV1Segmentation;
    pub type StdVideoAV1TileInfoFlags = super::defs::StdVideoAV1TileInfoFlags;
    pub type StdVideoAV1TileInfo = super::defs::StdVideoAV1TileInfo<'static>;
    pub type StdVideoAV1CDEF = super::defs::StdVideoAV1CDEF;
    pub type StdVideoAV1LoopRestoration = super::defs::StdVideoAV1LoopRestoration;
    pub type StdVideoAV1GlobalMotion = super::defs::StdVideoAV1GlobalMotion;
    pub type StdVideoAV1FilmGrainFlags = super::defs::StdVideoAV1FilmGrainFlags;
    pub type StdVideoAV1FilmGrain = super::defs::StdVideoAV1FilmGrain;
    pub type StdVideoAV1Profile = super::defs::StdVideoAV1Profile;
    pub type StdVideoAV1Level = super::defs::StdVideoAV1Level;
    pub type StdVideoAV1FrameType = super::defs::StdVideoAV1FrameType;
    pub type StdVideoAV1ReferenceName = super::defs::StdVideoAV1ReferenceName;
    pub type StdVideoAV1InterpolationFilter = super::defs::StdVideoAV1InterpolationFilter;
    pub type StdVideoAV1TxMode = super::defs::StdVideoAV1TxMode;
    pub type StdVideoAV1FrameRestorationType = super::defs::StdVideoAV1FrameRestorationType;
    pub type StdVideoAV1ColorPrimaries = super::defs::StdVideoAV1ColorPrimaries;
    pub type StdVideoAV1TransferCharacteristics = super::defs::StdVideoAV1TransferCharacteristics;
    pub type StdVideoAV1MatrixCoefficients = super::defs::StdVideoAV1MatrixCoefficients;
    pub type StdVideoAV1ChromaSamplePosition = super::defs::StdVideoAV1ChromaSamplePosition;
    impl super::defs::StdVideoAV1SequenceHeader<'_> {
        #[inline]
        pub unsafe fn drop_lifetime_for_ffi(&self) -> &StdVideoAV1SequenceHeader {
            unsafe { core::mem::transmute(self) }
        }
    }
    impl super::defs::StdVideoAV1TileInfo<'_> {
        #[inline]
        pub unsafe fn drop_lifetime_for_ffi(&self) -> &StdVideoAV1TileInfo {
            unsafe { core::mem::transmute(self) }
        }
    }
}