Repository navigation
Expand file tree
/
Copy pathvulkan_video.v
More file actions
2140 lines (1899 loc) · 70 KB
/
Copy pathvulkan_video.v
File metadata and controls
2140 lines (1899 loc) · 70 KB
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
/*
MIT License
Copyright (c) 2024-2026 Anton Oreskin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
// Registry-generated Vulkan declarations; native handles follow Vulkan lifetime rules.
// Regenerate in antono2/v_vulkan_bindings with v run scripts/generate.vsh.
// Vulkan Video declarations are generated by scripts/generate_video.vsh.
module vulkan
pub fn make_video_std_version(major u32, minor u32, patch u32) u32 {
return (major << 22) | (minor << 12) | patch
}
pub const std_video_h264_cpb_cnt_list_size = u32(32)
pub const std_video_h264_scaling_list_4x4_num_lists = u32(6)
pub const std_video_h264_scaling_list_4x4_num_elements = u32(16)
pub const std_video_h264_scaling_list_8x8_num_lists = u32(6)
pub const std_video_h264_scaling_list_8x8_num_elements = u32(64)
pub const std_video_h264_max_num_list_ref = u32(32)
pub const std_video_h264_max_chroma_planes = u32(2)
pub const std_video_h264_no_reference_picture = u8(0xff)
pub enum StdVideoH264ChromaFormatIdc as u32 {
monochrome = 0
_420 = 1
_422 = 2
_444 = 3
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264ProfileIdc as u32 {
baseline = 66
main = 77
high = 100
high10 = 110
high422 = 122
high444_predictive = 244
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264LevelIdc as u32 {
_1_0 = 0
_1_1 = 1
_1_2 = 2
_1_3 = 3
_2_0 = 4
_2_1 = 5
_2_2 = 6
_3_0 = 7
_3_1 = 8
_3_2 = 9
_4_0 = 10
_4_1 = 11
_4_2 = 12
_5_0 = 13
_5_1 = 14
_5_2 = 15
_6_0 = 16
_6_1 = 17
_6_2 = 18
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264PocType as u32 {
_0 = 0
_1 = 1
_2 = 2
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264AspectRatioIdc as u32 {
unspecified = 0
square = 1
_12_11 = 2
_10_11 = 3
_16_11 = 4
_40_33 = 5
_24_11 = 6
_20_11 = 7
_32_11 = 8
_80_33 = 9
_18_11 = 10
_15_11 = 11
_64_33 = 12
_160_99 = 13
_4_3 = 14
_3_2 = 15
_2_1 = 16
extended_sar = 255
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264WeightedBipredIdc as u32 {
default = 0
explicit = 1
implicit = 2
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264ModificationOfPicNumsIdc as u32 {
short_term_subtract = 0
short_term_add = 1
long_term = 2
end = 3
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264MemMgmtControlOp as u32 {
end = 0
unmark_short_term = 1
unmark_long_term = 2
mark_long_term = 3
set_max_long_term_index = 4
unmark_all = 5
mark_current_as_long_term = 6
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264CabacInitIdc as u32 {
_0 = 0
_1 = 1
_2 = 2
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264DisableDeblockingFilterIdc as u32 {
disabled = 0
enabled = 1
partial = 2
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264SliceType as u32 {
p = 0
b = 1
i = 2
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264PictureType as u32 {
p = 0
b = 1
i = 2
idr = 5
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH264NonVclNaluType as u32 {
sps = 0
pps = 1
aud = 2
prefix = 3
end_of_sequence = 4
end_of_stream = 5
precoded = 6
invalid = u32(0x7FFFFFFF)
}
pub type StdVideoH264SpsVuiFlags = C.StdVideoH264SpsVuiFlags
@[typedef]
pub struct C.StdVideoH264SpsVuiFlags {
pub mut:
aspect_ratio_info_present_flag u32
overscan_info_present_flag u32
overscan_appropriate_flag u32
video_signal_type_present_flag u32
video_full_range_flag u32
color_description_present_flag u32
chroma_loc_info_present_flag u32
timing_info_present_flag u32
fixed_frame_rate_flag u32
bitstream_restriction_flag u32
nal_hrd_parameters_present_flag u32
vcl_hrd_parameters_present_flag u32
}
pub type StdVideoH264HrdParameters = C.StdVideoH264HrdParameters
@[typedef]
pub struct C.StdVideoH264HrdParameters {
pub mut:
cpb_cnt_minus1 u8
bit_rate_scale u8
cpb_size_scale u8
reserved1 u8
bit_rate_value_minus1 [std_video_h264_cpb_cnt_list_size]u32
cpb_size_value_minus1 [std_video_h264_cpb_cnt_list_size]u32
cbr_flag [std_video_h264_cpb_cnt_list_size]u8
initial_cpb_removal_delay_length_minus1 u32
cpb_removal_delay_length_minus1 u32
dpb_output_delay_length_minus1 u32
time_offset_length u32
}
pub type StdVideoH264SequenceParameterSetVui = C.StdVideoH264SequenceParameterSetVui
@[typedef]
pub struct C.StdVideoH264SequenceParameterSetVui {
pub mut:
flags StdVideoH264SpsVuiFlags
aspect_ratio_idc StdVideoH264AspectRatioIdc
sar_width u16
sar_height u16
video_format u8
colour_primaries u8
transfer_characteristics u8
matrix_coefficients u8
num_units_in_tick u32
time_scale u32
max_num_reorder_frames u8
max_dec_frame_buffering u8
chroma_sample_loc_type_top_field u8
chroma_sample_loc_type_bottom_field u8
reserved1 u32
pHrdParameters &StdVideoH264HrdParameters
}
pub type StdVideoH264SpsFlags = C.StdVideoH264SpsFlags
@[typedef]
pub struct C.StdVideoH264SpsFlags {
pub mut:
constraint_set0_flag u32
constraint_set1_flag u32
constraint_set2_flag u32
constraint_set3_flag u32
constraint_set4_flag u32
constraint_set5_flag u32
direct_8x8_inference_flag u32
mb_adaptive_frame_field_flag u32
frame_mbs_only_flag u32
delta_pic_order_always_zero_flag u32
separate_colour_plane_flag u32
gaps_in_frame_num_value_allowed_flag u32
qpprime_y_zero_transform_bypass_flag u32
frame_cropping_flag u32
seq_scaling_matrix_present_flag u32
vui_parameters_present_flag u32
}
pub type StdVideoH264ScalingListsScalingList4x4Array = [std_video_h264_scaling_list_4x4_num_lists][std_video_h264_scaling_list_4x4_num_elements]u8
pub type StdVideoH264ScalingListsScalingList8x8Array = [std_video_h264_scaling_list_8x8_num_lists][std_video_h264_scaling_list_8x8_num_elements]u8
pub type StdVideoH264ScalingLists = C.StdVideoH264ScalingLists
@[typedef]
pub struct C.StdVideoH264ScalingLists {
pub mut:
scaling_list_present_mask u16
use_default_scaling_matrix_mask u16
ScalingList4x4 StdVideoH264ScalingListsScalingList4x4Array
ScalingList8x8 StdVideoH264ScalingListsScalingList8x8Array
}
pub type StdVideoH264SequenceParameterSet = C.StdVideoH264SequenceParameterSet
@[typedef]
pub struct C.StdVideoH264SequenceParameterSet {
pub mut:
flags StdVideoH264SpsFlags
profile_idc StdVideoH264ProfileIdc
level_idc StdVideoH264LevelIdc
chroma_format_idc StdVideoH264ChromaFormatIdc
seq_parameter_set_id u8
bit_depth_luma_minus8 u8
bit_depth_chroma_minus8 u8
log2_max_frame_num_minus4 u8
pic_order_cnt_type StdVideoH264PocType
offset_for_non_ref_pic i32
offset_for_top_to_bottom_field i32
log2_max_pic_order_cnt_lsb_minus4 u8
num_ref_frames_in_pic_order_cnt_cycle u8
max_num_ref_frames u8
reserved1 u8
pic_width_in_mbs_minus1 u32
pic_height_in_map_units_minus1 u32
frame_crop_left_offset u32
frame_crop_right_offset u32
frame_crop_top_offset u32
frame_crop_bottom_offset u32
reserved2 u32
pOffsetForRefFrame &i32
pScalingLists &StdVideoH264ScalingLists
pSequenceParameterSetVui &StdVideoH264SequenceParameterSetVui
}
pub type StdVideoH264PpsFlags = C.StdVideoH264PpsFlags
@[typedef]
pub struct C.StdVideoH264PpsFlags {
pub mut:
transform_8x8_mode_flag u32
redundant_pic_cnt_present_flag u32
constrained_intra_pred_flag u32
deblocking_filter_control_present_flag u32
weighted_pred_flag u32
bottom_field_pic_order_in_frame_present_flag u32
entropy_coding_mode_flag u32
pic_scaling_matrix_present_flag u32
}
pub type StdVideoH264PictureParameterSet = C.StdVideoH264PictureParameterSet
@[typedef]
pub struct C.StdVideoH264PictureParameterSet {
pub mut:
flags StdVideoH264PpsFlags
seq_parameter_set_id u8
pic_parameter_set_id u8
num_ref_idx_l0_default_active_minus1 u8
num_ref_idx_l1_default_active_minus1 u8
weighted_bipred_idc StdVideoH264WeightedBipredIdc
pic_init_qp_minus26 i8
pic_init_qs_minus26 i8
chroma_qp_index_offset i8
second_chroma_qp_index_offset i8
pScalingLists &StdVideoH264ScalingLists
}
pub const std_vulkan_video_codec_h264_decode_api_version_1_0_0 = make_video_std_version(1, 0, 0)
pub const std_video_decode_h264_field_order_count_list_size = u32(2)
pub const std_vulkan_video_codec_h264_decode_spec_version = std_vulkan_video_codec_h264_decode_api_version_1_0_0
pub const std_vulkan_video_codec_h264_decode_extension_name = c'VK_STD_vulkan_video_codec_h264_decode'
pub enum StdVideoDecodeH264FieldOrderCount as u32 {
top = 0
bottom = 1
invalid = u32(0x7FFFFFFF)
}
pub type StdVideoDecodeH264PictureInfoFlags = C.StdVideoDecodeH264PictureInfoFlags
@[typedef]
pub struct C.StdVideoDecodeH264PictureInfoFlags {
pub mut:
field_pic_flag u32
is_intra u32
IdrPicFlag u32
bottom_field_flag u32
is_reference u32
complementary_field_pair u32
}
pub type StdVideoDecodeH264PictureInfoPicOrderCntArray = [std_video_decode_h264_field_order_count_list_size]i32
pub type StdVideoDecodeH264PictureInfo = C.StdVideoDecodeH264PictureInfo
@[typedef]
pub struct C.StdVideoDecodeH264PictureInfo {
pub mut:
flags StdVideoDecodeH264PictureInfoFlags
seq_parameter_set_id u8
pic_parameter_set_id u8
reserved1 u8
reserved2 u8
frame_num u16
idr_pic_id u16
PicOrderCnt StdVideoDecodeH264PictureInfoPicOrderCntArray
}
pub type StdVideoDecodeH264ReferenceInfoFlags = C.StdVideoDecodeH264ReferenceInfoFlags
@[typedef]
pub struct C.StdVideoDecodeH264ReferenceInfoFlags {
pub mut:
top_field_flag u32
bottom_field_flag u32
used_for_long_term_reference u32
is_non_existing u32
}
pub type StdVideoDecodeH264ReferenceInfoPicOrderCntArray = [std_video_decode_h264_field_order_count_list_size]i32
pub type StdVideoDecodeH264ReferenceInfo = C.StdVideoDecodeH264ReferenceInfo
@[typedef]
pub struct C.StdVideoDecodeH264ReferenceInfo {
pub mut:
flags StdVideoDecodeH264ReferenceInfoFlags
FrameNum u16
reserved u16
PicOrderCnt StdVideoDecodeH264ReferenceInfoPicOrderCntArray
}
pub const std_vulkan_video_codec_h264_encode_api_version_1_0_0 = make_video_std_version(1, 0, 0)
pub const std_vulkan_video_codec_h264_encode_spec_version = std_vulkan_video_codec_h264_encode_api_version_1_0_0
pub const std_vulkan_video_codec_h264_encode_extension_name = c'VK_STD_vulkan_video_codec_h264_encode'
pub type StdVideoEncodeH264WeightTableFlags = C.StdVideoEncodeH264WeightTableFlags
@[typedef]
pub struct C.StdVideoEncodeH264WeightTableFlags {
pub mut:
luma_weight_l0_flag u32
chroma_weight_l0_flag u32
luma_weight_l1_flag u32
chroma_weight_l1_flag u32
}
pub type StdVideoEncodeH264WeightTable = C.StdVideoEncodeH264WeightTable
@[typedef]
pub struct C.StdVideoEncodeH264WeightTable {
pub mut:
flags StdVideoEncodeH264WeightTableFlags
luma_log2_weight_denom u8
chroma_log2_weight_denom u8
luma_weight_l0 [std_video_h264_max_num_list_ref]i8
luma_offset_l0 [std_video_h264_max_num_list_ref]i8
chroma_weight_l0 [std_video_h264_max_num_list_ref][std_video_h264_max_chroma_planes]i8
chroma_offset_l0 [std_video_h264_max_num_list_ref][std_video_h264_max_chroma_planes]i8
luma_weight_l1 [std_video_h264_max_num_list_ref]i8
luma_offset_l1 [std_video_h264_max_num_list_ref]i8
chroma_weight_l1 [std_video_h264_max_num_list_ref][std_video_h264_max_chroma_planes]i8
chroma_offset_l1 [std_video_h264_max_num_list_ref][std_video_h264_max_chroma_planes]i8
}
pub type StdVideoEncodeH264SliceHeaderFlags = C.StdVideoEncodeH264SliceHeaderFlags
@[typedef]
pub struct C.StdVideoEncodeH264SliceHeaderFlags {
pub mut:
direct_spatial_mv_pred_flag u32
num_ref_idx_active_override_flag u32
reserved u32
}
pub type StdVideoEncodeH264PictureInfoFlags = C.StdVideoEncodeH264PictureInfoFlags
@[typedef]
pub struct C.StdVideoEncodeH264PictureInfoFlags {
pub mut:
IdrPicFlag u32
is_reference u32
no_output_of_prior_pics_flag u32
long_term_reference_flag u32
adaptive_ref_pic_marking_mode_flag u32
reserved u32
}
pub type StdVideoEncodeH264ReferenceInfoFlags = C.StdVideoEncodeH264ReferenceInfoFlags
@[typedef]
pub struct C.StdVideoEncodeH264ReferenceInfoFlags {
pub mut:
used_for_long_term_reference u32
reserved u32
}
pub type StdVideoEncodeH264ReferenceListsInfoFlags = C.StdVideoEncodeH264ReferenceListsInfoFlags
@[typedef]
pub struct C.StdVideoEncodeH264ReferenceListsInfoFlags {
pub mut:
ref_pic_list_modification_flag_l0 u32
ref_pic_list_modification_flag_l1 u32
reserved u32
}
pub type StdVideoEncodeH264RefListModEntry = C.StdVideoEncodeH264RefListModEntry
@[typedef]
pub struct C.StdVideoEncodeH264RefListModEntry {
pub mut:
modification_of_pic_nums_idc StdVideoH264ModificationOfPicNumsIdc
abs_diff_pic_num_minus1 u16
long_term_pic_num u16
}
pub type StdVideoEncodeH264RefPicMarkingEntry = C.StdVideoEncodeH264RefPicMarkingEntry
@[typedef]
pub struct C.StdVideoEncodeH264RefPicMarkingEntry {
pub mut:
memory_management_control_operation StdVideoH264MemMgmtControlOp
difference_of_pic_nums_minus1 u16
long_term_pic_num u16
long_term_frame_idx u16
max_long_term_frame_idx_plus1 u16
}
pub type StdVideoEncodeH264ReferenceListsInfoRefPicList0Array = [std_video_h264_max_num_list_ref]u8
pub type StdVideoEncodeH264ReferenceListsInfoRefPicList1Array = [std_video_h264_max_num_list_ref]u8
pub type StdVideoEncodeH264ReferenceListsInfo = C.StdVideoEncodeH264ReferenceListsInfo
@[typedef]
pub struct C.StdVideoEncodeH264ReferenceListsInfo {
pub mut:
flags StdVideoEncodeH264ReferenceListsInfoFlags
num_ref_idx_l0_active_minus1 u8
num_ref_idx_l1_active_minus1 u8
RefPicList0 StdVideoEncodeH264ReferenceListsInfoRefPicList0Array
RefPicList1 StdVideoEncodeH264ReferenceListsInfoRefPicList1Array
refList0ModOpCount u8
refList1ModOpCount u8
refPicMarkingOpCount u8
reserved1 [7]u8
pRefList0ModOperations &StdVideoEncodeH264RefListModEntry
pRefList1ModOperations &StdVideoEncodeH264RefListModEntry
pRefPicMarkingOperations &StdVideoEncodeH264RefPicMarkingEntry
}
pub type StdVideoEncodeH264PictureInfo = C.StdVideoEncodeH264PictureInfo
@[typedef]
pub struct C.StdVideoEncodeH264PictureInfo {
pub mut:
flags StdVideoEncodeH264PictureInfoFlags
seq_parameter_set_id u8
pic_parameter_set_id u8
idr_pic_id u16
primary_pic_type StdVideoH264PictureType
frame_num u32
PicOrderCnt i32
temporal_id u8
reserved1 [3]u8
pRefLists &StdVideoEncodeH264ReferenceListsInfo
}
pub type StdVideoEncodeH264ReferenceInfo = C.StdVideoEncodeH264ReferenceInfo
@[typedef]
pub struct C.StdVideoEncodeH264ReferenceInfo {
pub mut:
flags StdVideoEncodeH264ReferenceInfoFlags
primary_pic_type StdVideoH264PictureType
FrameNum u32
PicOrderCnt i32
long_term_pic_num u16
long_term_frame_idx u16
temporal_id u8
}
pub type StdVideoEncodeH264SliceHeader = C.StdVideoEncodeH264SliceHeader
@[typedef]
pub struct C.StdVideoEncodeH264SliceHeader {
pub mut:
flags StdVideoEncodeH264SliceHeaderFlags
first_mb_in_slice u32
slice_type StdVideoH264SliceType
slice_alpha_c0_offset_div2 i8
slice_beta_offset_div2 i8
slice_qp_delta i8
reserved1 u8
cabac_init_idc StdVideoH264CabacInitIdc
disable_deblocking_filter_idc StdVideoH264DisableDeblockingFilterIdc
pWeightTable &StdVideoEncodeH264WeightTable
}
pub const std_video_h265_sublayers_list_size = u32(7)
pub const std_video_h265_cpb_cnt_list_size = u32(32)
pub const std_video_h265_scaling_list_4x4_num_lists = u32(6)
pub const std_video_h265_scaling_list_4x4_num_elements = u32(16)
pub const std_video_h265_scaling_list_8x8_num_lists = u32(6)
pub const std_video_h265_scaling_list_8x8_num_elements = u32(64)
pub const std_video_h265_scaling_list_16x16_num_lists = u32(6)
pub const std_video_h265_scaling_list_16x16_num_elements = u32(64)
pub const std_video_h265_scaling_list_32x32_num_lists = u32(2)
pub const std_video_h265_scaling_list_32x32_num_elements = u32(64)
pub const std_video_h265_predictor_palette_components_list_size = u32(3)
pub const std_video_h265_predictor_palette_comp_entries_list_size = u32(128)
pub const std_video_h265_max_dpb_size = u32(16)
pub const std_video_h265_max_long_term_ref_pics_sps = u32(32)
pub const std_video_h265_chroma_qp_offset_list_size = u32(6)
pub const std_video_h265_chroma_qp_offset_tile_cols_list_size = u32(19)
pub const std_video_h265_chroma_qp_offset_tile_rows_list_size = u32(21)
pub const std_video_h265_max_num_list_ref = u32(15)
pub const std_video_h265_max_chroma_planes = u32(2)
pub const std_video_h265_max_short_term_ref_pic_sets = u32(64)
pub const std_video_h265_max_long_term_pics = u32(16)
pub const std_video_h265_max_delta_poc = u32(48)
pub const std_video_h265_no_reference_picture = u8(0xff)
pub enum StdVideoH265ChromaFormatIdc as u32 {
monochrome = 0
_420 = 1
_422 = 2
_444 = 3
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH265ProfileIdc as u32 {
main = 1
main10 = 2
main_still_picture = 3
format_range_extensions = 4
scc_extensions = 9
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH265LevelIdc as u32 {
_1_0 = 0
_2_0 = 1
_2_1 = 2
_3_0 = 3
_3_1 = 4
_4_0 = 5
_4_1 = 6
_5_0 = 7
_5_1 = 8
_5_2 = 9
_6_0 = 10
_6_1 = 11
_6_2 = 12
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH265SliceType as u32 {
b = 0
p = 1
i = 2
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH265PictureType as u32 {
p = 0
b = 1
i = 2
idr = 3
invalid = u32(0x7FFFFFFF)
}
pub enum StdVideoH265AspectRatioIdc as u32 {
unspecified = 0
square = 1
_12_11 = 2
_10_11 = 3
_16_11 = 4
_40_33 = 5
_24_11 = 6
_20_11 = 7
_32_11 = 8
_80_33 = 9
_18_11 = 10
_15_11 = 11
_64_33 = 12
_160_99 = 13
_4_3 = 14
_3_2 = 15
_2_1 = 16
extended_sar = 255
invalid = u32(0x7FFFFFFF)
}
pub type StdVideoH265DecPicBufMgr = C.StdVideoH265DecPicBufMgr
@[typedef]
pub struct C.StdVideoH265DecPicBufMgr {
pub mut:
max_latency_increase_plus1 [std_video_h265_sublayers_list_size]u32
max_dec_pic_buffering_minus1 [std_video_h265_sublayers_list_size]u8
max_num_reorder_pics [std_video_h265_sublayers_list_size]u8
}
pub type StdVideoH265SubLayerHrdParameters = C.StdVideoH265SubLayerHrdParameters
@[typedef]
pub struct C.StdVideoH265SubLayerHrdParameters {
pub mut:
bit_rate_value_minus1 [std_video_h265_cpb_cnt_list_size]u32
cpb_size_value_minus1 [std_video_h265_cpb_cnt_list_size]u32
cpb_size_du_value_minus1 [std_video_h265_cpb_cnt_list_size]u32
bit_rate_du_value_minus1 [std_video_h265_cpb_cnt_list_size]u32
cbr_flag u32
}
pub type StdVideoH265HrdFlags = C.StdVideoH265HrdFlags
@[typedef]
pub struct C.StdVideoH265HrdFlags {
pub mut:
nal_hrd_parameters_present_flag u32
vcl_hrd_parameters_present_flag u32
sub_pic_hrd_params_present_flag u32
sub_pic_cpb_params_in_pic_timing_sei_flag u32
fixed_pic_rate_general_flag u32
fixed_pic_rate_within_cvs_flag u32
low_delay_hrd_flag u32
}
pub type StdVideoH265HrdParameters = C.StdVideoH265HrdParameters
@[typedef]
pub struct C.StdVideoH265HrdParameters {
pub mut:
flags StdVideoH265HrdFlags
tick_divisor_minus2 u8
du_cpb_removal_delay_increment_length_minus1 u8
dpb_output_delay_du_length_minus1 u8
bit_rate_scale u8
cpb_size_scale u8
cpb_size_du_scale u8
initial_cpb_removal_delay_length_minus1 u8
au_cpb_removal_delay_length_minus1 u8
dpb_output_delay_length_minus1 u8
cpb_cnt_minus1 [std_video_h265_sublayers_list_size]u8
elemental_duration_in_tc_minus1 [std_video_h265_sublayers_list_size]u16
reserved [3]u16
pSubLayerHrdParametersNal &StdVideoH265SubLayerHrdParameters
pSubLayerHrdParametersVcl &StdVideoH265SubLayerHrdParameters
}
pub type StdVideoH265VpsFlags = C.StdVideoH265VpsFlags
@[typedef]
pub struct C.StdVideoH265VpsFlags {
pub mut:
vps_temporal_id_nesting_flag u32
vps_sub_layer_ordering_info_present_flag u32
vps_timing_info_present_flag u32
vps_poc_proportional_to_timing_flag u32
}
pub type StdVideoH265ProfileTierLevelFlags = C.StdVideoH265ProfileTierLevelFlags
@[typedef]
pub struct C.StdVideoH265ProfileTierLevelFlags {
pub mut:
general_tier_flag u32
general_progressive_source_flag u32
general_interlaced_source_flag u32
general_non_packed_constraint_flag u32
general_frame_only_constraint_flag u32
}
pub type StdVideoH265ProfileTierLevel = C.StdVideoH265ProfileTierLevel
@[typedef]
pub struct C.StdVideoH265ProfileTierLevel {
pub mut:
flags StdVideoH265ProfileTierLevelFlags
general_profile_idc StdVideoH265ProfileIdc
general_level_idc StdVideoH265LevelIdc
}
pub type StdVideoH265VideoParameterSet = C.StdVideoH265VideoParameterSet
@[typedef]
pub struct C.StdVideoH265VideoParameterSet {
pub mut:
flags StdVideoH265VpsFlags
vps_video_parameter_set_id u8
vps_max_sub_layers_minus1 u8
reserved1 u8
reserved2 u8
vps_num_units_in_tick u32
vps_time_scale u32
vps_num_ticks_poc_diff_one_minus1 u32
reserved3 u32
pDecPicBufMgr &StdVideoH265DecPicBufMgr
pHrdParameters &StdVideoH265HrdParameters
pProfileTierLevel &StdVideoH265ProfileTierLevel
}
pub type StdVideoH265ScalingListsScalingList4x4Array = [std_video_h265_scaling_list_4x4_num_lists][std_video_h265_scaling_list_4x4_num_elements]u8
pub type StdVideoH265ScalingListsScalingList8x8Array = [std_video_h265_scaling_list_8x8_num_lists][std_video_h265_scaling_list_8x8_num_elements]u8
pub type StdVideoH265ScalingListsScalingList16x16Array = [std_video_h265_scaling_list_16x16_num_lists][std_video_h265_scaling_list_16x16_num_elements]u8
pub type StdVideoH265ScalingListsScalingList32x32Array = [std_video_h265_scaling_list_32x32_num_lists][std_video_h265_scaling_list_32x32_num_elements]u8
pub type StdVideoH265ScalingListsScalingListDCCoef16x16Array = [std_video_h265_scaling_list_16x16_num_lists]u8
pub type StdVideoH265ScalingListsScalingListDCCoef32x32Array = [std_video_h265_scaling_list_32x32_num_lists]u8
pub type StdVideoH265ScalingLists = C.StdVideoH265ScalingLists
@[typedef]
pub struct C.StdVideoH265ScalingLists {
pub mut:
ScalingList4x4 StdVideoH265ScalingListsScalingList4x4Array
ScalingList8x8 StdVideoH265ScalingListsScalingList8x8Array
ScalingList16x16 StdVideoH265ScalingListsScalingList16x16Array
ScalingList32x32 StdVideoH265ScalingListsScalingList32x32Array
ScalingListDCCoef16x16 StdVideoH265ScalingListsScalingListDCCoef16x16Array
ScalingListDCCoef32x32 StdVideoH265ScalingListsScalingListDCCoef32x32Array
}
pub type StdVideoH265SpsVuiFlags = C.StdVideoH265SpsVuiFlags
@[typedef]
pub struct C.StdVideoH265SpsVuiFlags {
pub mut:
aspect_ratio_info_present_flag u32
overscan_info_present_flag u32
overscan_appropriate_flag u32
video_signal_type_present_flag u32
video_full_range_flag u32
colour_description_present_flag u32
chroma_loc_info_present_flag u32
neutral_chroma_indication_flag u32
field_seq_flag u32
frame_field_info_present_flag u32
default_display_window_flag u32
vui_timing_info_present_flag u32
vui_poc_proportional_to_timing_flag u32
vui_hrd_parameters_present_flag u32
bitstream_restriction_flag u32
tiles_fixed_structure_flag u32
motion_vectors_over_pic_boundaries_flag u32
restricted_ref_pic_lists_flag u32
}
pub type StdVideoH265SequenceParameterSetVui = C.StdVideoH265SequenceParameterSetVui
@[typedef]
pub struct C.StdVideoH265SequenceParameterSetVui {
pub mut:
flags StdVideoH265SpsVuiFlags
aspect_ratio_idc StdVideoH265AspectRatioIdc
sar_width u16
sar_height u16
video_format u8
colour_primaries u8
transfer_characteristics u8
matrix_coeffs u8
chroma_sample_loc_type_top_field u8
chroma_sample_loc_type_bottom_field u8
reserved1 u8
reserved2 u8
def_disp_win_left_offset u16
def_disp_win_right_offset u16
def_disp_win_top_offset u16
def_disp_win_bottom_offset u16
vui_num_units_in_tick u32
vui_time_scale u32
vui_num_ticks_poc_diff_one_minus1 u32
min_spatial_segmentation_idc u16
reserved3 u16
max_bytes_per_pic_denom u8
max_bits_per_min_cu_denom u8
log2_max_mv_length_horizontal u8
log2_max_mv_length_vertical u8
pHrdParameters &StdVideoH265HrdParameters
}
pub type StdVideoH265PredictorPaletteEntriesPredictorPaletteEntriesArray = [std_video_h265_predictor_palette_components_list_size][std_video_h265_predictor_palette_comp_entries_list_size]u16
pub type StdVideoH265PredictorPaletteEntries = C.StdVideoH265PredictorPaletteEntries
@[typedef]
pub struct C.StdVideoH265PredictorPaletteEntries {
pub mut:
PredictorPaletteEntries StdVideoH265PredictorPaletteEntriesPredictorPaletteEntriesArray
}
pub type StdVideoH265SpsFlags = C.StdVideoH265SpsFlags
@[typedef]
pub struct C.StdVideoH265SpsFlags {
pub mut:
sps_temporal_id_nesting_flag u32
separate_colour_plane_flag u32
conformance_window_flag u32
sps_sub_layer_ordering_info_present_flag u32
scaling_list_enabled_flag u32
sps_scaling_list_data_present_flag u32
amp_enabled_flag u32
sample_adaptive_offset_enabled_flag u32
pcm_enabled_flag u32
pcm_loop_filter_disabled_flag u32
long_term_ref_pics_present_flag u32
sps_temporal_mvp_enabled_flag u32
strong_intra_smoothing_enabled_flag u32
vui_parameters_present_flag u32
sps_extension_present_flag u32
sps_range_extension_flag u32
transform_skip_rotation_enabled_flag u32
transform_skip_context_enabled_flag u32
implicit_rdpcm_enabled_flag u32
explicit_rdpcm_enabled_flag u32
extended_precision_processing_flag u32
intra_smoothing_disabled_flag u32
high_precision_offsets_enabled_flag u32
persistent_rice_adaptation_enabled_flag u32
cabac_bypass_alignment_enabled_flag u32
sps_scc_extension_flag u32
sps_curr_pic_ref_enabled_flag u32
palette_mode_enabled_flag u32
sps_palette_predictor_initializers_present_flag u32
intra_boundary_filtering_disabled_flag u32
}
pub type StdVideoH265ShortTermRefPicSetFlags = C.StdVideoH265ShortTermRefPicSetFlags
@[typedef]
pub struct C.StdVideoH265ShortTermRefPicSetFlags {
pub mut:
inter_ref_pic_set_prediction_flag u32
delta_rps_sign u32
}
pub type StdVideoH265ShortTermRefPicSet = C.StdVideoH265ShortTermRefPicSet
@[typedef]
pub struct C.StdVideoH265ShortTermRefPicSet {
pub mut:
flags StdVideoH265ShortTermRefPicSetFlags
delta_idx_minus1 u32
use_delta_flag u16
abs_delta_rps_minus1 u16
used_by_curr_pic_flag u16
used_by_curr_pic_s0_flag u16
used_by_curr_pic_s1_flag u16
reserved1 u16
reserved2 u8
reserved3 u8
num_negative_pics u8
num_positive_pics u8
delta_poc_s0_minus1 [std_video_h265_max_dpb_size]u16
delta_poc_s1_minus1 [std_video_h265_max_dpb_size]u16
}
pub type StdVideoH265LongTermRefPicsSps = C.StdVideoH265LongTermRefPicsSps
@[typedef]
pub struct C.StdVideoH265LongTermRefPicsSps {
pub mut:
used_by_curr_pic_lt_sps_flag u32
lt_ref_pic_poc_lsb_sps [std_video_h265_max_long_term_ref_pics_sps]u32
}
pub type StdVideoH265SequenceParameterSet = C.StdVideoH265SequenceParameterSet
@[typedef]
pub struct C.StdVideoH265SequenceParameterSet {
pub mut:
flags StdVideoH265SpsFlags
chroma_format_idc StdVideoH265ChromaFormatIdc
pic_width_in_luma_samples u32
pic_height_in_luma_samples u32
sps_video_parameter_set_id u8
sps_max_sub_layers_minus1 u8
sps_seq_parameter_set_id u8
bit_depth_luma_minus8 u8
bit_depth_chroma_minus8 u8
log2_max_pic_order_cnt_lsb_minus4 u8
log2_min_luma_coding_block_size_minus3 u8
log2_diff_max_min_luma_coding_block_size u8
log2_min_luma_transform_block_size_minus2 u8
log2_diff_max_min_luma_transform_block_size u8
max_transform_hierarchy_depth_inter u8
max_transform_hierarchy_depth_intra u8
num_short_term_ref_pic_sets u8
num_long_term_ref_pics_sps u8
pcm_sample_bit_depth_luma_minus1 u8
pcm_sample_bit_depth_chroma_minus1 u8
log2_min_pcm_luma_coding_block_size_minus3 u8
log2_diff_max_min_pcm_luma_coding_block_size u8
reserved1 u8
reserved2 u8
palette_max_size u8
delta_palette_max_predictor_size u8
motion_vector_resolution_control_idc u8
sps_num_palette_predictor_initializers_minus1 u8
conf_win_left_offset u32
conf_win_right_offset u32
conf_win_top_offset u32
conf_win_bottom_offset u32
pProfileTierLevel &StdVideoH265ProfileTierLevel
pDecPicBufMgr &StdVideoH265DecPicBufMgr
pScalingLists &StdVideoH265ScalingLists
pShortTermRefPicSet &StdVideoH265ShortTermRefPicSet
pLongTermRefPicsSps &StdVideoH265LongTermRefPicsSps
pSequenceParameterSetVui &StdVideoH265SequenceParameterSetVui
pPredictorPaletteEntries &StdVideoH265PredictorPaletteEntries
}
pub type StdVideoH265PpsFlags = C.StdVideoH265PpsFlags
@[typedef]
pub struct C.StdVideoH265PpsFlags {
pub mut:
dependent_slice_segments_enabled_flag u32
output_flag_present_flag u32
sign_data_hiding_enabled_flag u32
cabac_init_present_flag u32
constrained_intra_pred_flag u32
transform_skip_enabled_flag u32
cu_qp_delta_enabled_flag u32
pps_slice_chroma_qp_offsets_present_flag u32
weighted_pred_flag u32
weighted_bipred_flag u32
transquant_bypass_enabled_flag u32
tiles_enabled_flag u32
entropy_coding_sync_enabled_flag u32
uniform_spacing_flag u32
loop_filter_across_tiles_enabled_flag u32
pps_loop_filter_across_slices_enabled_flag u32
deblocking_filter_control_present_flag u32