From 51f59976b4815c27b6d5606daf14565b8ee87677 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 20 Oct 2022 19:41:23 +0200 Subject: [PATCH] generator: Upgrade to `bindgen 0.61.0` (#673) Seems to mostly result in less unused type aliases being generated, and improved/reworked testing infrastructure. --- ash/src/vk/native.rs | 9835 ++++++++++++++++-------------------------- generator/Cargo.toml | 2 +- 2 files changed, 3822 insertions(+), 6015 deletions(-) diff --git a/ash/src/vk/native.rs b/ash/src/vk/native.rs index 23e2ba8a3..09b7fb7e6 100644 --- a/ash/src/vk/native.rs +++ b/ash/src/vk/native.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.60.1 */ +/* automatically generated by rust-bindgen 0.61.0 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -80,15 +80,6 @@ where } } } -pub type size_t = ::std::os::raw::c_ulong; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_long; -pub type __uint64_t = ::std::os::raw::c_ulong; pub const StdVideoH264ChromaFormatIdc_STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME: StdVideoH264ChromaFormatIdc = 0; pub const StdVideoH264ChromaFormatIdc_STD_VIDEO_H264_CHROMA_FORMAT_IDC_420: @@ -477,6 +468,9 @@ pub struct StdVideoH264HrdParameters { } #[test] fn bindgen_test_layout_StdVideoH264HrdParameters() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 308usize, @@ -487,177 +481,113 @@ fn bindgen_test_layout_StdVideoH264HrdParameters() { 4usize, concat!("Alignment of ", stringify!(StdVideoH264HrdParameters)) ); - fn test_field_cpb_cnt_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_cnt_minus1) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_cnt_minus1) - ) - ); - } - test_field_cpb_cnt_minus1(); - fn test_field_bit_rate_scale() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_rate_scale) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(bit_rate_scale) - ) - ); - } - test_field_bit_rate_scale(); - fn test_field_cpb_size_scale() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_size_scale) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_size_scale) - ) - ); - } - test_field_cpb_size_scale(); - fn test_field_bit_rate_value_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_rate_value_minus1) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(bit_rate_value_minus1) - ) - ); - } - test_field_bit_rate_value_minus1(); - fn test_field_cpb_size_value_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_size_value_minus1) as usize - ptr as usize - }, - 132usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_size_value_minus1) - ) - ); - } - test_field_cpb_size_value_minus1(); - fn test_field_cbr_flag() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cbr_flag) as usize - ptr as usize - }, - 260usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cbr_flag) - ) - ); - } - test_field_cbr_flag(); - fn test_field_initial_cpb_removal_delay_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).initial_cpb_removal_delay_length_minus1) as usize - - ptr as usize - }, - 292usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(initial_cpb_removal_delay_length_minus1) - ) - ); - } - test_field_initial_cpb_removal_delay_length_minus1(); - fn test_field_cpb_removal_delay_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_removal_delay_length_minus1) as usize - ptr as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_removal_delay_length_minus1) - ) - ); - } - test_field_cpb_removal_delay_length_minus1(); - fn test_field_dpb_output_delay_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dpb_output_delay_length_minus1) as usize - ptr as usize - }, - 300usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(dpb_output_delay_length_minus1) - ) - ); - } - test_field_dpb_output_delay_length_minus1(); - fn test_field_time_offset_length() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time_offset_length) as usize - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(time_offset_length) - ) - ); - } - test_field_time_offset_length(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_cnt_minus1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(cpb_cnt_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_rate_scale) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(bit_rate_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_size_scale) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(cpb_size_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_rate_value_minus1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(bit_rate_value_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_size_value_minus1) as usize - ptr as usize }, + 132usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(cpb_size_value_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cbr_flag) as usize - ptr as usize }, + 260usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(cbr_flag) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).initial_cpb_removal_delay_length_minus1) as usize + - ptr as usize + }, + 292usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(initial_cpb_removal_delay_length_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).cpb_removal_delay_length_minus1) as usize - ptr as usize + }, + 296usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(cpb_removal_delay_length_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).dpb_output_delay_length_minus1) as usize - ptr as usize + }, + 300usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(dpb_output_delay_length_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_offset_length) as usize - ptr as usize }, + 304usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264HrdParameters), + "::", + stringify!(time_offset_length) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -678,6 +608,9 @@ pub struct StdVideoH264SequenceParameterSetVui { } #[test] fn bindgen_test_layout_StdVideoH264SequenceParameterSetVui() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -691,240 +624,136 @@ fn bindgen_test_layout_StdVideoH264SequenceParameterSetVui() { stringify!(StdVideoH264SequenceParameterSetVui) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_aspect_ratio_idc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).aspect_ratio_idc) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(aspect_ratio_idc) - ) - ); - } - test_field_aspect_ratio_idc(); - fn test_field_sar_width() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sar_width) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(sar_width) - ) - ); - } - test_field_sar_width(); - fn test_field_sar_height() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sar_height) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(sar_height) - ) - ); - } - test_field_sar_height(); - fn test_field_video_format() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).video_format) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(video_format) - ) - ); - } - test_field_video_format(); - fn test_field_color_primaries() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(color_primaries) - ) - ); - } - test_field_color_primaries(); - fn test_field_transfer_characteristics() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).transfer_characteristics) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(transfer_characteristics) - ) - ); - } - test_field_transfer_characteristics(); - fn test_field_matrix_coefficients() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).matrix_coefficients) as usize - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(matrix_coefficients) - ) - ); - } - test_field_matrix_coefficients(); - fn test_field_num_units_in_tick() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_units_in_tick) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(num_units_in_tick) - ) - ); - } - test_field_num_units_in_tick(); - fn test_field_time_scale() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time_scale) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(time_scale) - ) - ); - } - test_field_time_scale(); - fn test_field_pHrdParameters() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pHrdParameters) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(pHrdParameters) - ) - ); - } - test_field_pHrdParameters(); - fn test_field_max_num_reorder_frames() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_num_reorder_frames) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(max_num_reorder_frames) - ) - ); - } - test_field_max_num_reorder_frames(); - fn test_field_max_dec_frame_buffering() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_dec_frame_buffering) as usize - ptr as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(max_dec_frame_buffering) - ) - ); - } - test_field_max_dec_frame_buffering(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).aspect_ratio_idc) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(aspect_ratio_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sar_width) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(sar_width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sar_height) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(sar_height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).video_format) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(video_format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(color_primaries) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).transfer_characteristics) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(transfer_characteristics) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).matrix_coefficients) as usize - ptr as usize }, + 15usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(matrix_coefficients) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_units_in_tick) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(num_units_in_tick) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_scale) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(time_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pHrdParameters) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(pHrdParameters) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_num_reorder_frames) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(max_num_reorder_frames) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_dec_frame_buffering) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(max_dec_frame_buffering) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -1229,6 +1058,9 @@ pub struct StdVideoH264ScalingLists { } #[test] fn bindgen_test_layout_StdVideoH264ScalingLists() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 226usize, @@ -1239,74 +1071,48 @@ fn bindgen_test_layout_StdVideoH264ScalingLists() { 1usize, concat!("Alignment of ", stringify!(StdVideoH264ScalingLists)) ); - fn test_field_scaling_list_present_mask() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).scaling_list_present_mask) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(scaling_list_present_mask) - ) - ); - } - test_field_scaling_list_present_mask(); - fn test_field_use_default_scaling_matrix_mask() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).use_default_scaling_matrix_mask) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(use_default_scaling_matrix_mask) - ) - ); - } - test_field_use_default_scaling_matrix_mask(); - fn test_field_ScalingList4x4() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingList4x4) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(ScalingList4x4) - ) - ); - } - test_field_ScalingList4x4(); - fn test_field_ScalingList8x8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingList8x8) as usize - ptr as usize - }, - 98usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(ScalingList8x8) - ) - ); - } - test_field_ScalingList8x8(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_present_mask) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264ScalingLists), + "::", + stringify!(scaling_list_present_mask) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).use_default_scaling_matrix_mask) as usize - ptr as usize + }, + 1usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264ScalingLists), + "::", + stringify!(use_default_scaling_matrix_mask) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingList4x4) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264ScalingLists), + "::", + stringify!(ScalingList4x4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingList8x8) as usize - ptr as usize }, + 98usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264ScalingLists), + "::", + stringify!(ScalingList8x8) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1337,6 +1143,9 @@ pub struct StdVideoH264SequenceParameterSet { } #[test] fn bindgen_test_layout_StdVideoH264SequenceParameterSet() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 96usize, @@ -1350,399 +1159,245 @@ fn bindgen_test_layout_StdVideoH264SequenceParameterSet() { stringify!(StdVideoH264SequenceParameterSet) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_profile_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).profile_idc) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(profile_idc) - ) - ); - } - test_field_profile_idc(); - fn test_field_level_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).level_idc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(level_idc) - ) - ); - } - test_field_level_idc(); - fn test_field_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(seq_parameter_set_id) - ) - ); - } - test_field_seq_parameter_set_id(); - fn test_field_chroma_format_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(chroma_format_idc) - ) - ); - } - test_field_chroma_format_idc(); - fn test_field_bit_depth_luma_minus8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(bit_depth_luma_minus8) - ) - ); - } - test_field_bit_depth_luma_minus8(); - fn test_field_bit_depth_chroma_minus8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(bit_depth_chroma_minus8) - ) - ); - } - test_field_bit_depth_chroma_minus8(); - fn test_field_log2_max_frame_num_minus4() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_max_frame_num_minus4) as usize - ptr as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(log2_max_frame_num_minus4) - ) - ); - } - test_field_log2_max_frame_num_minus4(); - fn test_field_pic_order_cnt_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_order_cnt_type) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pic_order_cnt_type) - ) - ); - } - test_field_pic_order_cnt_type(); - fn test_field_log2_max_pic_order_cnt_lsb_minus4() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(log2_max_pic_order_cnt_lsb_minus4) - ) - ); - } - test_field_log2_max_pic_order_cnt_lsb_minus4(); - fn test_field_offset_for_non_ref_pic() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).offset_for_non_ref_pic) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(offset_for_non_ref_pic) - ) - ); - } - test_field_offset_for_non_ref_pic(); - fn test_field_offset_for_top_to_bottom_field() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).offset_for_top_to_bottom_field) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(offset_for_top_to_bottom_field) - ) - ); - } - test_field_offset_for_top_to_bottom_field(); - fn test_field_num_ref_frames_in_pic_order_cnt_cycle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_frames_in_pic_order_cnt_cycle) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(num_ref_frames_in_pic_order_cnt_cycle) - ) - ); - } - test_field_num_ref_frames_in_pic_order_cnt_cycle(); - fn test_field_max_num_ref_frames() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_num_ref_frames) as usize - ptr as usize - }, - 41usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(max_num_ref_frames) - ) - ); - } - test_field_max_num_ref_frames(); - fn test_field_pic_width_in_mbs_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_width_in_mbs_minus1) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pic_width_in_mbs_minus1) - ) - ); - } - test_field_pic_width_in_mbs_minus1(); - fn test_field_pic_height_in_map_units_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_height_in_map_units_minus1) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pic_height_in_map_units_minus1) - ) - ); - } - test_field_pic_height_in_map_units_minus1(); - fn test_field_frame_crop_left_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).frame_crop_left_offset) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_left_offset) - ) - ); - } - test_field_frame_crop_left_offset(); - fn test_field_frame_crop_right_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).frame_crop_right_offset) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_right_offset) - ) - ); - } - test_field_frame_crop_right_offset(); - fn test_field_frame_crop_top_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).frame_crop_top_offset) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_top_offset) - ) - ); - } - test_field_frame_crop_top_offset(); - fn test_field_frame_crop_bottom_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).frame_crop_bottom_offset) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_bottom_offset) - ) - ); - } - test_field_frame_crop_bottom_offset(); - fn test_field_pOffsetForRefFrame() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pOffsetForRefFrame) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pOffsetForRefFrame) - ) - ); - } - test_field_pOffsetForRefFrame(); - fn test_field_pScalingLists() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - } - test_field_pScalingLists(); - fn test_field_pSequenceParameterSetVui() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pSequenceParameterSetVui) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pSequenceParameterSetVui) - ) - ); - } - test_field_pSequenceParameterSetVui(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).profile_idc) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(profile_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level_idc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(level_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(chroma_format_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(bit_depth_luma_minus8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize }, + 21usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(bit_depth_chroma_minus8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).log2_max_frame_num_minus4) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(log2_max_frame_num_minus4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_type) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pic_order_cnt_type) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(log2_max_pic_order_cnt_lsb_minus4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset_for_non_ref_pic) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(offset_for_non_ref_pic) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).offset_for_top_to_bottom_field) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(offset_for_top_to_bottom_field) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_frames_in_pic_order_cnt_cycle) as usize + - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(num_ref_frames_in_pic_order_cnt_cycle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_num_ref_frames) as usize - ptr as usize }, + 41usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(max_num_ref_frames) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_width_in_mbs_minus1) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pic_width_in_mbs_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pic_height_in_map_units_minus1) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pic_height_in_map_units_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_crop_left_offset) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(frame_crop_left_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_crop_right_offset) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(frame_crop_right_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_crop_top_offset) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(frame_crop_top_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_crop_bottom_offset) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(frame_crop_bottom_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pOffsetForRefFrame) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pOffsetForRefFrame) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pScalingLists) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pSequenceParameterSetVui) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pSequenceParameterSetVui) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -1942,6 +1597,9 @@ pub struct StdVideoH264PictureParameterSet { } #[test] fn bindgen_test_layout_StdVideoH264PictureParameterSet() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -1952,225 +1610,154 @@ fn bindgen_test_layout_StdVideoH264PictureParameterSet() { 8usize, concat!("Alignment of ", stringify!(StdVideoH264PictureParameterSet)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(seq_parameter_set_id) - ) - ); - } - test_field_seq_parameter_set_id(); - fn test_field_pic_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pic_parameter_set_id) - ) - ); - } - test_field_pic_parameter_set_id(); - fn test_field_num_ref_idx_l0_default_active_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(num_ref_idx_l0_default_active_minus1) - ) - ); - } - test_field_num_ref_idx_l0_default_active_minus1(); - fn test_field_num_ref_idx_l1_default_active_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize - - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(num_ref_idx_l1_default_active_minus1) - ) - ); - } - test_field_num_ref_idx_l1_default_active_minus1(); - fn test_field_weighted_bipred_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).weighted_bipred_idc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(weighted_bipred_idc) - ) - ); - } - test_field_weighted_bipred_idc(); - fn test_field_pic_init_qp_minus26() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_init_qp_minus26) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pic_init_qp_minus26) - ) - ); - } - test_field_pic_init_qp_minus26(); - fn test_field_pic_init_qs_minus26() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_init_qs_minus26) as usize - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pic_init_qs_minus26) - ) - ); - } - test_field_pic_init_qs_minus26(); - fn test_field_chroma_qp_index_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_qp_index_offset) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(chroma_qp_index_offset) - ) - ); - } - test_field_chroma_qp_index_offset(); - fn test_field_second_chroma_qp_index_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).second_chroma_qp_index_offset) as usize - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(second_chroma_qp_index_offset) - ) - ); - } - test_field_second_chroma_qp_index_offset(); - fn test_field_pScalingLists() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - } - test_field_pScalingLists(); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoDecodeH264PictureInfoFlags { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout_StdVideoDecodeH264PictureInfoFlags() { assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(StdVideoDecodeH264PictureInfoFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(flags) + ) ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, 4usize, concat!( - "Alignment of ", - stringify!(StdVideoDecodeH264PictureInfoFlags) + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(seq_parameter_set_id) ) ); -} -impl StdVideoDecodeH264PictureInfoFlags { - #[inline] - pub fn field_pic_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize + - ptr as usize + }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(num_ref_idx_l0_default_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize + - ptr as usize + }, + 7usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(num_ref_idx_l1_default_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).weighted_bipred_idc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(weighted_bipred_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_init_qp_minus26) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(pic_init_qp_minus26) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_init_qs_minus26) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(pic_init_qs_minus26) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_qp_index_offset) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(chroma_qp_index_offset) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).second_chroma_qp_index_offset) as usize - ptr as usize + }, + 15usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(second_chroma_qp_index_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(pScalingLists) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264PictureInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264PictureInfoFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH264PictureInfoFlags) + ) + ); +} +impl StdVideoDecodeH264PictureInfoFlags { + #[inline] + pub fn field_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } #[inline] pub fn set_field_pic_flag(&mut self, val: u32) { unsafe { @@ -2284,6 +1871,9 @@ pub struct StdVideoDecodeH264PictureInfo { } #[test] fn bindgen_test_layout_StdVideoDecodeH264PictureInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -2294,125 +1884,76 @@ fn bindgen_test_layout_StdVideoDecodeH264PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264PictureInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(seq_parameter_set_id) - ) - ); - } - test_field_seq_parameter_set_id(); - fn test_field_pic_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(pic_parameter_set_id) - ) - ); - } - test_field_pic_parameter_set_id(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); - fn test_field_frame_num() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(frame_num) - ) - ); - } - test_field_frame_num(); - fn test_field_idr_pic_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).idr_pic_id) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(idr_pic_id) - ) - ); - } - test_field_idr_pic_id(); - fn test_field_PicOrderCnt() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(PicOrderCnt) - ) - ); - } - test_field_PicOrderCnt(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(frame_num) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).idr_pic_id) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(idr_pic_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(PicOrderCnt) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -2524,6 +2065,9 @@ pub struct StdVideoDecodeH264ReferenceInfo { } #[test] fn bindgen_test_layout_StdVideoDecodeH264ReferenceInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -2534,74 +2078,46 @@ fn bindgen_test_layout_StdVideoDecodeH264ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264ReferenceInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_FrameNum() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).FrameNum) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(FrameNum) - ) - ); - } - test_field_FrameNum(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); - fn test_field_PicOrderCnt() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(PicOrderCnt) - ) - ); - } - test_field_PicOrderCnt(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).FrameNum) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(FrameNum) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(PicOrderCnt) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -2702,6 +2218,9 @@ pub struct StdVideoDecodeH264MvcElement { } #[test] fn bindgen_test_layout_StdVideoDecodeH264MvcElement() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 140usize, @@ -2712,227 +2231,136 @@ fn bindgen_test_layout_StdVideoDecodeH264MvcElement() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264MvcElement)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_viewOrderIndex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewOrderIndex) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewOrderIndex) - ) - ); - } - test_field_viewOrderIndex(); - fn test_field_viewId() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewId) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewId) - ) - ); - } - test_field_viewId(); - fn test_field_temporalId() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).temporalId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(temporalId) - ) - ); - } - test_field_temporalId(); - fn test_field_priorityId() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).priorityId) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(priorityId) - ) - ); - } - test_field_priorityId(); - fn test_field_numOfAnchorRefsInL0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numOfAnchorRefsInL0) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfAnchorRefsInL0) - ) - ); - } - test_field_numOfAnchorRefsInL0(); - fn test_field_viewIdOfAnchorRefsInL0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewIdOfAnchorRefsInL0) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfAnchorRefsInL0) - ) - ); - } - test_field_viewIdOfAnchorRefsInL0(); - fn test_field_numOfAnchorRefsInL1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numOfAnchorRefsInL1) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfAnchorRefsInL1) - ) - ); - } - test_field_numOfAnchorRefsInL1(); - fn test_field_viewIdOfAnchorRefsInL1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewIdOfAnchorRefsInL1) as usize - ptr as usize - }, - 46usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfAnchorRefsInL1) - ) - ); - } - test_field_viewIdOfAnchorRefsInL1(); - fn test_field_numOfNonAnchorRefsInL0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numOfNonAnchorRefsInL0) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfNonAnchorRefsInL0) - ) - ); - } - test_field_numOfNonAnchorRefsInL0(); - fn test_field_viewIdOfNonAnchorRefsInL0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewIdOfNonAnchorRefsInL0) as usize - ptr as usize - }, - 78usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfNonAnchorRefsInL0) - ) - ); - } - test_field_viewIdOfNonAnchorRefsInL0(); - fn test_field_numOfNonAnchorRefsInL1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numOfNonAnchorRefsInL1) as usize - ptr as usize - }, - 108usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfNonAnchorRefsInL1) - ) - ); - } - test_field_numOfNonAnchorRefsInL1(); - fn test_field_viewIdOfNonAnchorRefsInL1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewIdOfNonAnchorRefsInL1) as usize - ptr as usize - }, - 110usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfNonAnchorRefsInL1) - ) - ); - } - test_field_viewIdOfNonAnchorRefsInL1(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewOrderIndex) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(viewOrderIndex) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewId) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(viewId) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).temporalId) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(temporalId) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).priorityId) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(priorityId) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numOfAnchorRefsInL0) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(numOfAnchorRefsInL0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewIdOfAnchorRefsInL0) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(viewIdOfAnchorRefsInL0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numOfAnchorRefsInL1) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(numOfAnchorRefsInL1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewIdOfAnchorRefsInL1) as usize - ptr as usize }, + 46usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(viewIdOfAnchorRefsInL1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numOfNonAnchorRefsInL0) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(numOfNonAnchorRefsInL0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewIdOfNonAnchorRefsInL0) as usize - ptr as usize }, + 78usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(viewIdOfNonAnchorRefsInL0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numOfNonAnchorRefsInL1) as usize - ptr as usize }, + 108usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(numOfNonAnchorRefsInL1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewIdOfNonAnchorRefsInL1) as usize - ptr as usize }, + 110usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264MvcElement), + "::", + stringify!(viewIdOfNonAnchorRefsInL1) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2943,6 +2371,9 @@ pub struct StdVideoDecodeH264Mvc { } #[test] fn bindgen_test_layout_StdVideoDecodeH264Mvc() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -2953,57 +2384,36 @@ fn bindgen_test_layout_StdVideoDecodeH264Mvc() { 8usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264Mvc)) ); - fn test_field_viewId0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).viewId0) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264Mvc), - "::", - stringify!(viewId0) - ) - ); - } - test_field_viewId0(); - fn test_field_mvcElementCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mvcElementCount) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264Mvc), - "::", - stringify!(mvcElementCount) - ) - ); - } - test_field_mvcElementCount(); - fn test_field_pMvcElements() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pMvcElements) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264Mvc), - "::", - stringify!(pMvcElements) - ) - ); - } - test_field_pMvcElements(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).viewId0) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264Mvc), + "::", + stringify!(viewId0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mvcElementCount) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264Mvc), + "::", + stringify!(mvcElementCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pMvcElements) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264Mvc), + "::", + stringify!(pMvcElements) + ) + ); } pub const StdVideoH265ProfileIdc_STD_VIDEO_H265_PROFILE_IDC_MAIN: StdVideoH265ProfileIdc = 1; pub const StdVideoH265ProfileIdc_STD_VIDEO_H265_PROFILE_IDC_MAIN_10: StdVideoH265ProfileIdc = 2; @@ -3053,6 +2463,9 @@ pub struct StdVideoH265DecPicBufMgr { } #[test] fn bindgen_test_layout_StdVideoH265DecPicBufMgr() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -3063,57 +2476,38 @@ fn bindgen_test_layout_StdVideoH265DecPicBufMgr() { 4usize, concat!("Alignment of ", stringify!(StdVideoH265DecPicBufMgr)) ); - fn test_field_max_latency_increase_plus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_latency_increase_plus1) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265DecPicBufMgr), - "::", - stringify!(max_latency_increase_plus1) - ) - ); - } - test_field_max_latency_increase_plus1(); - fn test_field_max_dec_pic_buffering_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_dec_pic_buffering_minus1) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265DecPicBufMgr), - "::", - stringify!(max_dec_pic_buffering_minus1) - ) - ); - } - test_field_max_dec_pic_buffering_minus1(); - fn test_field_max_num_reorder_pics() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_num_reorder_pics) as usize - ptr as usize - }, - 35usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265DecPicBufMgr), - "::", - stringify!(max_num_reorder_pics) - ) - ); - } - test_field_max_num_reorder_pics(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_latency_increase_plus1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265DecPicBufMgr), + "::", + stringify!(max_latency_increase_plus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_dec_pic_buffering_minus1) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265DecPicBufMgr), + "::", + stringify!(max_dec_pic_buffering_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_num_reorder_pics) as usize - ptr as usize }, + 35usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265DecPicBufMgr), + "::", + stringify!(max_num_reorder_pics) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3126,6 +2520,9 @@ pub struct StdVideoH265SubLayerHrdParameters { } #[test] fn bindgen_test_layout_StdVideoH265SubLayerHrdParameters() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 516usize, @@ -3139,91 +2536,56 @@ fn bindgen_test_layout_StdVideoH265SubLayerHrdParameters() { stringify!(StdVideoH265SubLayerHrdParameters) ) ); - fn test_field_bit_rate_value_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_rate_value_minus1) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(bit_rate_value_minus1) - ) - ); - } - test_field_bit_rate_value_minus1(); - fn test_field_cpb_size_value_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_size_value_minus1) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(cpb_size_value_minus1) - ) - ); - } - test_field_cpb_size_value_minus1(); - fn test_field_cpb_size_du_value_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_size_du_value_minus1) as usize - ptr as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(cpb_size_du_value_minus1) - ) - ); - } - test_field_cpb_size_du_value_minus1(); - fn test_field_bit_rate_du_value_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_rate_du_value_minus1) as usize - ptr as usize - }, - 384usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(bit_rate_du_value_minus1) - ) - ); - } - test_field_bit_rate_du_value_minus1(); - fn test_field_cbr_flag() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cbr_flag) as usize - ptr as usize - }, - 512usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(cbr_flag) - ) - ); - } - test_field_cbr_flag(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_rate_value_minus1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SubLayerHrdParameters), + "::", + stringify!(bit_rate_value_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_size_value_minus1) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SubLayerHrdParameters), + "::", + stringify!(cpb_size_value_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_size_du_value_minus1) as usize - ptr as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SubLayerHrdParameters), + "::", + stringify!(cpb_size_du_value_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_rate_du_value_minus1) as usize - ptr as usize }, + 384usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SubLayerHrdParameters), + "::", + stringify!(bit_rate_du_value_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cbr_flag) as usize - ptr as usize }, + 512usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SubLayerHrdParameters), + "::", + stringify!(cbr_flag) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -3391,6 +2753,9 @@ pub struct StdVideoH265HrdParameters { } #[test] fn bindgen_test_layout_StdVideoH265HrdParameters() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 152usize, @@ -3401,281 +2766,193 @@ fn bindgen_test_layout_StdVideoH265HrdParameters() { 8usize, concat!("Alignment of ", stringify!(StdVideoH265HrdParameters)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_tick_divisor_minus2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tick_divisor_minus2) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(tick_divisor_minus2) - ) - ); - } - test_field_tick_divisor_minus2(); - fn test_field_du_cpb_removal_delay_increment_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).du_cpb_removal_delay_increment_length_minus1) as usize - - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(du_cpb_removal_delay_increment_length_minus1) - ) - ); - } - test_field_du_cpb_removal_delay_increment_length_minus1(); - fn test_field_dpb_output_delay_du_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dpb_output_delay_du_length_minus1) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(dpb_output_delay_du_length_minus1) - ) - ); - } - test_field_dpb_output_delay_du_length_minus1(); - fn test_field_bit_rate_scale() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_rate_scale) as usize - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(bit_rate_scale) - ) - ); - } - test_field_bit_rate_scale(); - fn test_field_cpb_size_scale() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_size_scale) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(cpb_size_scale) - ) - ); - } - test_field_cpb_size_scale(); - fn test_field_cpb_size_du_scale() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_size_du_scale) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(cpb_size_du_scale) - ) - ); - } - test_field_cpb_size_du_scale(); - fn test_field_initial_cpb_removal_delay_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).initial_cpb_removal_delay_length_minus1) as usize - - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(initial_cpb_removal_delay_length_minus1) - ) - ); - } - test_field_initial_cpb_removal_delay_length_minus1(); - fn test_field_au_cpb_removal_delay_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).au_cpb_removal_delay_length_minus1) as usize - - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(au_cpb_removal_delay_length_minus1) - ) - ); - } - test_field_au_cpb_removal_delay_length_minus1(); - fn test_field_dpb_output_delay_length_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dpb_output_delay_length_minus1) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(dpb_output_delay_length_minus1) - ) - ); - } - test_field_dpb_output_delay_length_minus1(); - fn test_field_cpb_cnt_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cpb_cnt_minus1) as usize - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(cpb_cnt_minus1) - ) - ); - } - test_field_cpb_cnt_minus1(); - fn test_field_elemental_duration_in_tc_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).elemental_duration_in_tc_minus1) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(elemental_duration_in_tc_minus1) - ) - ); - } - test_field_elemental_duration_in_tc_minus1(); - fn test_field_pSubLayerHrdParametersNal() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pSubLayerHrdParametersNal) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(pSubLayerHrdParametersNal) - ) - ); - } - test_field_pSubLayerHrdParametersNal(); - fn test_field_pSubLayerHrdParametersVcl() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pSubLayerHrdParametersVcl) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(pSubLayerHrdParametersVcl) - ) - ); - } - test_field_pSubLayerHrdParametersVcl(); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoH265VpsFlags { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout_StdVideoH265VpsFlags() { assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(StdVideoH265VpsFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(flags) + ) ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).tick_divisor_minus2) as usize - ptr as usize }, 4usize, - concat!("Alignment of ", stringify!(StdVideoH265VpsFlags)) + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(tick_divisor_minus2) + ) ); -} -impl StdVideoH265VpsFlags { - #[inline] - pub fn vps_temporal_id_nesting_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_vps_temporal_id_nesting_flag(&mut self, val: u32) { + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } + ::std::ptr::addr_of!((*ptr).du_cpb_removal_delay_increment_length_minus1) as usize + - ptr as usize + }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(du_cpb_removal_delay_increment_length_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).dpb_output_delay_du_length_minus1) as usize - ptr as usize + }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(dpb_output_delay_du_length_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_rate_scale) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(bit_rate_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_size_scale) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(cpb_size_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_size_du_scale) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(cpb_size_du_scale) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).initial_cpb_removal_delay_length_minus1) as usize + - ptr as usize + }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(initial_cpb_removal_delay_length_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).au_cpb_removal_delay_length_minus1) as usize - ptr as usize + }, + 11usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(au_cpb_removal_delay_length_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).dpb_output_delay_length_minus1) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(dpb_output_delay_length_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpb_cnt_minus1) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(cpb_cnt_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).elemental_duration_in_tc_minus1) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(elemental_duration_in_tc_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pSubLayerHrdParametersNal) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(pSubLayerHrdParametersNal) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pSubLayerHrdParametersVcl) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(pSubLayerHrdParametersVcl) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265VpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoH265VpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265VpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265VpsFlags)) + ); +} +impl StdVideoH265VpsFlags { + #[inline] + pub fn vps_temporal_id_nesting_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_temporal_id_nesting_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } } #[inline] pub fn vps_sub_layer_ordering_info_present_flag(&self) -> u32 { @@ -3755,6 +3032,9 @@ pub struct StdVideoH265VideoParameterSet { } #[test] fn bindgen_test_layout_StdVideoH265VideoParameterSet() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -3765,143 +3045,88 @@ fn bindgen_test_layout_StdVideoH265VideoParameterSet() { 8usize, concat!("Alignment of ", stringify!(StdVideoH265VideoParameterSet)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_vps_video_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vps_video_parameter_set_id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_video_parameter_set_id) - ) - ); - } - test_field_vps_video_parameter_set_id(); - fn test_field_vps_max_sub_layers_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vps_max_sub_layers_minus1) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_max_sub_layers_minus1) - ) - ); - } - test_field_vps_max_sub_layers_minus1(); - fn test_field_vps_num_units_in_tick() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vps_num_units_in_tick) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_num_units_in_tick) - ) - ); - } - test_field_vps_num_units_in_tick(); - fn test_field_vps_time_scale() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vps_time_scale) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_time_scale) - ) - ); - } - test_field_vps_time_scale(); - fn test_field_vps_num_ticks_poc_diff_one_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vps_num_ticks_poc_diff_one_minus1) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_num_ticks_poc_diff_one_minus1) - ) - ); - } - test_field_vps_num_ticks_poc_diff_one_minus1(); - fn test_field_pDecPicBufMgr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pDecPicBufMgr) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(pDecPicBufMgr) - ) - ); - } - test_field_pDecPicBufMgr(); - fn test_field_pHrdParameters() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pHrdParameters) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(pHrdParameters) - ) - ); - } - test_field_pHrdParameters(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vps_video_parameter_set_id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(vps_video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vps_max_sub_layers_minus1) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(vps_max_sub_layers_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vps_num_units_in_tick) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(vps_num_units_in_tick) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vps_time_scale) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(vps_time_scale) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).vps_num_ticks_poc_diff_one_minus1) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(vps_num_ticks_poc_diff_one_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pDecPicBufMgr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(pDecPicBufMgr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pHrdParameters) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(pHrdParameters) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3915,6 +3140,9 @@ pub struct StdVideoH265ScalingLists { } #[test] fn bindgen_test_layout_StdVideoH265ScalingLists() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1000usize, @@ -3925,108 +3153,66 @@ fn bindgen_test_layout_StdVideoH265ScalingLists() { 1usize, concat!("Alignment of ", stringify!(StdVideoH265ScalingLists)) ); - fn test_field_ScalingList4x4() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingList4x4) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList4x4) - ) - ); - } - test_field_ScalingList4x4(); - fn test_field_ScalingList8x8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingList8x8) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList8x8) - ) - ); - } - test_field_ScalingList8x8(); - fn test_field_ScalingList16x16() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingList16x16) as usize - ptr as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList16x16) - ) - ); - } - test_field_ScalingList16x16(); - fn test_field_ScalingList32x32() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingList32x32) as usize - ptr as usize - }, - 864usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList32x32) - ) - ); - } - test_field_ScalingList32x32(); - fn test_field_ScalingListDCCoef16x16() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingListDCCoef16x16) as usize - ptr as usize - }, - 992usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingListDCCoef16x16) - ) - ); - } - test_field_ScalingListDCCoef16x16(); - fn test_field_ScalingListDCCoef32x32() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ScalingListDCCoef32x32) as usize - ptr as usize - }, - 998usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingListDCCoef32x32) - ) - ); - } - test_field_ScalingListDCCoef32x32(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingList4x4) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265ScalingLists), + "::", + stringify!(ScalingList4x4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingList8x8) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265ScalingLists), + "::", + stringify!(ScalingList8x8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingList16x16) as usize - ptr as usize }, + 480usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265ScalingLists), + "::", + stringify!(ScalingList16x16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingList32x32) as usize - ptr as usize }, + 864usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265ScalingLists), + "::", + stringify!(ScalingList32x32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingListDCCoef16x16) as usize - ptr as usize }, + 992usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265ScalingLists), + "::", + stringify!(ScalingListDCCoef16x16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ScalingListDCCoef32x32) as usize - ptr as usize }, + 998usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265ScalingLists), + "::", + stringify!(ScalingListDCCoef32x32) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -4391,6 +3577,9 @@ pub struct StdVideoH265SequenceParameterSetVui { } #[test] fn bindgen_test_layout_StdVideoH265SequenceParameterSetVui() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -4404,525 +3593,343 @@ fn bindgen_test_layout_StdVideoH265SequenceParameterSetVui() { stringify!(StdVideoH265SequenceParameterSetVui) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_aspect_ratio_idc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).aspect_ratio_idc) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(aspect_ratio_idc) - ) - ); - } - test_field_aspect_ratio_idc(); - fn test_field_sar_width() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sar_width) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(sar_width) - ) - ); - } - test_field_sar_width(); - fn test_field_sar_height() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sar_height) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(sar_height) - ) - ); - } - test_field_sar_height(); - fn test_field_video_format() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).video_format) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(video_format) - ) - ); - } - test_field_video_format(); - fn test_field_colour_primaries() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).colour_primaries) as usize - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(colour_primaries) - ) - ); - } - test_field_colour_primaries(); - fn test_field_transfer_characteristics() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).transfer_characteristics) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(transfer_characteristics) - ) - ); - } - test_field_transfer_characteristics(); - fn test_field_matrix_coeffs() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).matrix_coeffs) as usize - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(matrix_coeffs) - ) - ); - } - test_field_matrix_coeffs(); - fn test_field_chroma_sample_loc_type_top_field() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_sample_loc_type_top_field) as usize - - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(chroma_sample_loc_type_top_field) - ) - ); - } - test_field_chroma_sample_loc_type_top_field(); - fn test_field_chroma_sample_loc_type_bottom_field() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_sample_loc_type_bottom_field) as usize - - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(chroma_sample_loc_type_bottom_field) - ) - ); - } - test_field_chroma_sample_loc_type_bottom_field(); - fn test_field_def_disp_win_left_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).def_disp_win_left_offset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_left_offset) - ) - ); - } - test_field_def_disp_win_left_offset(); - fn test_field_def_disp_win_right_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).def_disp_win_right_offset) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_right_offset) - ) - ); - } - test_field_def_disp_win_right_offset(); - fn test_field_def_disp_win_top_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).def_disp_win_top_offset) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_top_offset) - ) - ); - } - test_field_def_disp_win_top_offset(); - fn test_field_def_disp_win_bottom_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).def_disp_win_bottom_offset) as usize - ptr as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_bottom_offset) - ) - ); - } - test_field_def_disp_win_bottom_offset(); - fn test_field_vui_num_units_in_tick() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vui_num_units_in_tick) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(vui_num_units_in_tick) - ) - ); - } - test_field_vui_num_units_in_tick(); - fn test_field_vui_time_scale() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vui_time_scale) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(vui_time_scale) - ) - ); - } - test_field_vui_time_scale(); - fn test_field_vui_num_ticks_poc_diff_one_minus1() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).vui_num_ticks_poc_diff_one_minus1) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(vui_num_ticks_poc_diff_one_minus1) - ) - ); - } - test_field_vui_num_ticks_poc_diff_one_minus1(); - fn test_field_pHrdParameters() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pHrdParameters) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(pHrdParameters) - ) - ); - } - test_field_pHrdParameters(); - fn test_field_min_spatial_segmentation_idc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).min_spatial_segmentation_idc) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(min_spatial_segmentation_idc) - ) - ); - } - test_field_min_spatial_segmentation_idc(); - fn test_field_max_bytes_per_pic_denom() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_bytes_per_pic_denom) as usize - ptr as usize - }, - 50usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(max_bytes_per_pic_denom) - ) - ); - } - test_field_max_bytes_per_pic_denom(); - fn test_field_max_bits_per_min_cu_denom() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_bits_per_min_cu_denom) as usize - ptr as usize - }, - 51usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(max_bits_per_min_cu_denom) - ) - ); - } - test_field_max_bits_per_min_cu_denom(); - fn test_field_log2_max_mv_length_horizontal() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_max_mv_length_horizontal) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(log2_max_mv_length_horizontal) - ) - ); - } - test_field_log2_max_mv_length_horizontal(); - fn test_field_log2_max_mv_length_vertical() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_max_mv_length_vertical) as usize - ptr as usize - }, - 53usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(log2_max_mv_length_vertical) - ) - ); - } - test_field_log2_max_mv_length_vertical(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoH265PredictorPaletteEntries { - pub PredictorPaletteEntries: [[u16; 128usize]; 3usize], -} -#[test] -fn bindgen_test_layout_StdVideoH265PredictorPaletteEntries() { assert_eq!( - ::std::mem::size_of::(), - 768usize, - concat!("Size of: ", stringify!(StdVideoH265PredictorPaletteEntries)) + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(flags) + ) ); assert_eq!( - ::std::mem::align_of::(), - 2usize, + unsafe { ::std::ptr::addr_of!((*ptr).aspect_ratio_idc) as usize - ptr as usize }, + 4usize, concat!( - "Alignment of ", - stringify!(StdVideoH265PredictorPaletteEntries) + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(aspect_ratio_idc) ) ); - fn test_field_PredictorPaletteEntries() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PredictorPaletteEntries) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PredictorPaletteEntries), - "::", - stringify!(PredictorPaletteEntries) - ) - ); - } - test_field_PredictorPaletteEntries(); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoH265SpsFlags { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_StdVideoH265SpsFlags() { assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(StdVideoH265SpsFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).sar_width) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(sar_width) + ) ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(StdVideoH265SpsFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).sar_height) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(sar_height) + ) ); -} -impl StdVideoH265SpsFlags { - #[inline] - pub fn sps_temporal_id_nesting_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_sps_temporal_id_nesting_flag(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn separate_colour_plane_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_separate_colour_plane_flag(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn scaling_list_enabled_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_scaling_list_enabled_flag(&mut self, val: u32) { + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).video_format) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(video_format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).colour_primaries) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(colour_primaries) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).transfer_characteristics) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(transfer_characteristics) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).matrix_coeffs) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(matrix_coeffs) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn sps_scaling_list_data_present_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_sps_scaling_list_data_present_flag(&mut self, val: u32) { + ::std::ptr::addr_of!((*ptr).chroma_sample_loc_type_top_field) as usize - ptr as usize + }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(chroma_sample_loc_type_top_field) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); + ::std::ptr::addr_of!((*ptr).chroma_sample_loc_type_bottom_field) as usize - ptr as usize + }, + 15usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(chroma_sample_loc_type_bottom_field) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).def_disp_win_left_offset) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(def_disp_win_left_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).def_disp_win_right_offset) as usize - ptr as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(def_disp_win_right_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).def_disp_win_top_offset) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(def_disp_win_top_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).def_disp_win_bottom_offset) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(def_disp_win_bottom_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vui_num_units_in_tick) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(vui_num_units_in_tick) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vui_time_scale) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(vui_time_scale) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).vui_num_ticks_poc_diff_one_minus1) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(vui_num_ticks_poc_diff_one_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pHrdParameters) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(pHrdParameters) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).min_spatial_segmentation_idc) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(min_spatial_segmentation_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_bytes_per_pic_denom) as usize - ptr as usize }, + 50usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(max_bytes_per_pic_denom) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_bits_per_min_cu_denom) as usize - ptr as usize }, + 51usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(max_bits_per_min_cu_denom) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_max_mv_length_horizontal) as usize - ptr as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(log2_max_mv_length_horizontal) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).log2_max_mv_length_vertical) as usize - ptr as usize }, + 53usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(log2_max_mv_length_vertical) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PredictorPaletteEntries { + pub PredictorPaletteEntries: [[u16; 128usize]; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoH265PredictorPaletteEntries() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 768usize, + concat!("Size of: ", stringify!(StdVideoH265PredictorPaletteEntries)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!( + "Alignment of ", + stringify!(StdVideoH265PredictorPaletteEntries) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PredictorPaletteEntries) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PredictorPaletteEntries), + "::", + stringify!(PredictorPaletteEntries) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_StdVideoH265SpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265SpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265SpsFlags)) + ); +} +impl StdVideoH265SpsFlags { + #[inline] + pub fn sps_temporal_id_nesting_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_id_nesting_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn separate_colour_plane_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_separate_colour_plane_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn scaling_list_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_scaling_list_data_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_scaling_list_data_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(3usize, 1u8, val as u64) } } @@ -5405,6 +4412,9 @@ pub struct StdVideoH265SequenceParameterSet { } #[test] fn bindgen_test_layout_StdVideoH265SequenceParameterSet() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 96usize, @@ -5418,690 +4428,460 @@ fn bindgen_test_layout_StdVideoH265SequenceParameterSet() { stringify!(StdVideoH265SequenceParameterSet) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_profile_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).profile_idc) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(profile_idc) - ) - ); - } - test_field_profile_idc(); - fn test_field_level_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).level_idc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(level_idc) - ) - ); - } - test_field_level_idc(); - fn test_field_pic_width_in_luma_samples() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_width_in_luma_samples) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pic_width_in_luma_samples) - ) - ); - } - test_field_pic_width_in_luma_samples(); - fn test_field_pic_height_in_luma_samples() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_height_in_luma_samples) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pic_height_in_luma_samples) - ) - ); - } - test_field_pic_height_in_luma_samples(); - fn test_field_sps_video_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sps_video_parameter_set_id) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_video_parameter_set_id) - ) - ); - } - test_field_sps_video_parameter_set_id(); - fn test_field_sps_max_sub_layers_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sps_max_sub_layers_minus1) as usize - ptr as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_max_sub_layers_minus1) - ) - ); - } - test_field_sps_max_sub_layers_minus1(); - fn test_field_sps_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sps_seq_parameter_set_id) as usize - ptr as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_seq_parameter_set_id) - ) - ); - } - test_field_sps_seq_parameter_set_id(); - fn test_field_chroma_format_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(chroma_format_idc) - ) - ); - } - test_field_chroma_format_idc(); - fn test_field_bit_depth_luma_minus8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(bit_depth_luma_minus8) - ) - ); - } - test_field_bit_depth_luma_minus8(); - fn test_field_bit_depth_chroma_minus8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(bit_depth_chroma_minus8) - ) - ); - } - test_field_bit_depth_chroma_minus8(); - fn test_field_log2_max_pic_order_cnt_lsb_minus4() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - - ptr as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_max_pic_order_cnt_lsb_minus4) - ) - ); - } - test_field_log2_max_pic_order_cnt_lsb_minus4(); - fn test_field_log2_min_luma_coding_block_size_minus3() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_min_luma_coding_block_size_minus3) as usize - - ptr as usize - }, - 27usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_min_luma_coding_block_size_minus3) - ) - ); - } - test_field_log2_min_luma_coding_block_size_minus3(); - fn test_field_log2_diff_max_min_luma_coding_block_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_coding_block_size) as usize - - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_diff_max_min_luma_coding_block_size) - ) - ); - } - test_field_log2_diff_max_min_luma_coding_block_size(); - fn test_field_log2_min_luma_transform_block_size_minus2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_min_luma_transform_block_size_minus2) as usize - - ptr as usize - }, - 29usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_min_luma_transform_block_size_minus2) - ) - ); - } - test_field_log2_min_luma_transform_block_size_minus2(); - fn test_field_log2_diff_max_min_luma_transform_block_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_transform_block_size) as usize - - ptr as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_diff_max_min_luma_transform_block_size) - ) - ); - } - test_field_log2_diff_max_min_luma_transform_block_size(); - fn test_field_max_transform_hierarchy_depth_inter() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_inter) as usize - - ptr as usize - }, - 31usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(max_transform_hierarchy_depth_inter) - ) - ); - } - test_field_max_transform_hierarchy_depth_inter(); - fn test_field_max_transform_hierarchy_depth_intra() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_intra) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(max_transform_hierarchy_depth_intra) - ) - ); - } - test_field_max_transform_hierarchy_depth_intra(); - fn test_field_num_short_term_ref_pic_sets() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(num_short_term_ref_pic_sets) - ) - ); - } - test_field_num_short_term_ref_pic_sets(); - fn test_field_num_long_term_ref_pics_sps() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_long_term_ref_pics_sps) as usize - ptr as usize - }, - 34usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(num_long_term_ref_pics_sps) - ) - ); - } - test_field_num_long_term_ref_pics_sps(); - fn test_field_pcm_sample_bit_depth_luma_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_luma_minus1) as usize - - ptr as usize - }, - 35usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pcm_sample_bit_depth_luma_minus1) - ) - ); - } - test_field_pcm_sample_bit_depth_luma_minus1(); - fn test_field_pcm_sample_bit_depth_chroma_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_chroma_minus1) as usize - - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pcm_sample_bit_depth_chroma_minus1) - ) - ); - } - test_field_pcm_sample_bit_depth_chroma_minus1(); - fn test_field_log2_min_pcm_luma_coding_block_size_minus3() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_min_pcm_luma_coding_block_size_minus3) as usize - - ptr as usize - }, - 37usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_min_pcm_luma_coding_block_size_minus3) - ) - ); - } - test_field_log2_min_pcm_luma_coding_block_size_minus3(); - fn test_field_log2_diff_max_min_pcm_luma_coding_block_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_diff_max_min_pcm_luma_coding_block_size) as usize - - ptr as usize - }, - 38usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_diff_max_min_pcm_luma_coding_block_size) - ) - ); - } - test_field_log2_diff_max_min_pcm_luma_coding_block_size(); - fn test_field_conf_win_left_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).conf_win_left_offset) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_left_offset) - ) - ); - } - test_field_conf_win_left_offset(); - fn test_field_conf_win_right_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).conf_win_right_offset) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_right_offset) - ) - ); - } - test_field_conf_win_right_offset(); - fn test_field_conf_win_top_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).conf_win_top_offset) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_top_offset) - ) - ); - } - test_field_conf_win_top_offset(); - fn test_field_conf_win_bottom_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).conf_win_bottom_offset) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_bottom_offset) - ) - ); - } - test_field_conf_win_bottom_offset(); - fn test_field_pDecPicBufMgr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pDecPicBufMgr) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pDecPicBufMgr) - ) - ); - } - test_field_pDecPicBufMgr(); - fn test_field_pScalingLists() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - } - test_field_pScalingLists(); - fn test_field_pSequenceParameterSetVui() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pSequenceParameterSetVui) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pSequenceParameterSetVui) - ) - ); - } - test_field_pSequenceParameterSetVui(); - fn test_field_palette_max_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).palette_max_size) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(palette_max_size) - ) - ); - } - test_field_palette_max_size(); - fn test_field_delta_palette_max_predictor_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_palette_max_predictor_size) as usize - - ptr as usize - }, - 81usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(delta_palette_max_predictor_size) - ) - ); - } - test_field_delta_palette_max_predictor_size(); - fn test_field_motion_vector_resolution_control_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).motion_vector_resolution_control_idc) as usize - - ptr as usize - }, - 82usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(motion_vector_resolution_control_idc) - ) - ); - } - test_field_motion_vector_resolution_control_idc(); - fn test_field_sps_num_palette_predictor_initializer_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sps_num_palette_predictor_initializer_minus1) as usize - - ptr as usize - }, - 83usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_num_palette_predictor_initializer_minus1) - ) - ); - } - test_field_sps_num_palette_predictor_initializer_minus1(); - fn test_field_pPredictorPaletteEntries() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pPredictorPaletteEntries) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pPredictorPaletteEntries) - ) - ); - } - test_field_pPredictorPaletteEntries(); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoH265PpsFlags { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_StdVideoH265PpsFlags() { assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(StdVideoH265PpsFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(flags) + ) ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).profile_idc) as usize - ptr as usize }, 4usize, - concat!("Alignment of ", stringify!(StdVideoH265PpsFlags)) + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(profile_idc) + ) ); -} -impl StdVideoH265PpsFlags { - #[inline] - pub fn dependent_slice_segments_enabled_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) { + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level_idc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(level_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_width_in_luma_samples) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pic_width_in_luma_samples) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_height_in_luma_samples) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pic_height_in_luma_samples) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_video_parameter_set_id) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(sps_video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_max_sub_layers_minus1) as usize - ptr as usize }, + 21usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(sps_max_sub_layers_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_seq_parameter_set_id) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(sps_seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize }, + 23usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(chroma_format_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(bit_depth_luma_minus8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(bit_depth_chroma_minus8) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn output_flag_present_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_output_flag_present_flag(&mut self, val: u32) { + ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - ptr as usize + }, + 26usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_max_pic_order_cnt_lsb_minus4) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn sign_data_hiding_enabled_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) { + ::std::ptr::addr_of!((*ptr).log2_min_luma_coding_block_size_minus3) as usize + - ptr as usize + }, + 27usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_min_luma_coding_block_size_minus3) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn cabac_init_present_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_coding_block_size) as usize + - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_diff_max_min_luma_coding_block_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_luma_transform_block_size_minus2) as usize + - ptr as usize + }, + 29usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_min_luma_transform_block_size_minus2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_transform_block_size) as usize + - ptr as usize + }, + 30usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_diff_max_min_luma_transform_block_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_inter) as usize - ptr as usize + }, + 31usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(max_transform_hierarchy_depth_inter) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_intra) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(max_transform_hierarchy_depth_intra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(num_short_term_ref_pic_sets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_long_term_ref_pics_sps) as usize - ptr as usize }, + 34usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(num_long_term_ref_pics_sps) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_luma_minus1) as usize - ptr as usize + }, + 35usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pcm_sample_bit_depth_luma_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_chroma_minus1) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pcm_sample_bit_depth_chroma_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_pcm_luma_coding_block_size_minus3) as usize + - ptr as usize + }, + 37usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_min_pcm_luma_coding_block_size_minus3) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_pcm_luma_coding_block_size) as usize + - ptr as usize + }, + 38usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_diff_max_min_pcm_luma_coding_block_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conf_win_left_offset) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(conf_win_left_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conf_win_right_offset) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(conf_win_right_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conf_win_top_offset) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(conf_win_top_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conf_win_bottom_offset) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(conf_win_bottom_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pDecPicBufMgr) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pDecPicBufMgr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pScalingLists) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pSequenceParameterSetVui) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pSequenceParameterSetVui) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).palette_max_size) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(palette_max_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).delta_palette_max_predictor_size) as usize - ptr as usize + }, + 81usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(delta_palette_max_predictor_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).motion_vector_resolution_control_idc) as usize + - ptr as usize + }, + 82usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(motion_vector_resolution_control_idc) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sps_num_palette_predictor_initializer_minus1) as usize + - ptr as usize + }, + 83usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(sps_num_palette_predictor_initializer_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pPredictorPaletteEntries) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pPredictorPaletteEntries) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_StdVideoH265PpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265PpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265PpsFlags)) + ); +} +impl StdVideoH265PpsFlags { + #[inline] + pub fn dependent_slice_segments_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn output_flag_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_output_flag_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn sign_data_hiding_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn cabac_init_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } #[inline] pub fn set_cabac_init_present_flag(&mut self, val: u32) { @@ -6634,6 +5414,9 @@ pub struct StdVideoH265PictureParameterSet { } #[test] fn bindgen_test_layout_StdVideoH265PictureParameterSet() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, @@ -6644,641 +5427,433 @@ fn bindgen_test_layout_StdVideoH265PictureParameterSet() { 8usize, concat!("Alignment of ", stringify!(StdVideoH265PictureParameterSet)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_pps_pic_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_pic_parameter_set_id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_pic_parameter_set_id) - ) - ); - } - test_field_pps_pic_parameter_set_id(); - fn test_field_pps_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_seq_parameter_set_id) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_seq_parameter_set_id) - ) - ); - } - test_field_pps_seq_parameter_set_id(); - fn test_field_num_extra_slice_header_bits() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_extra_slice_header_bits) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_extra_slice_header_bits) - ) - ); - } - test_field_num_extra_slice_header_bits(); - fn test_field_num_ref_idx_l0_default_active_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize - - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_ref_idx_l0_default_active_minus1) - ) - ); - } - test_field_num_ref_idx_l0_default_active_minus1(); - fn test_field_num_ref_idx_l1_default_active_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_ref_idx_l1_default_active_minus1) - ) - ); - } - test_field_num_ref_idx_l1_default_active_minus1(); - fn test_field_init_qp_minus26() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).init_qp_minus26) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(init_qp_minus26) - ) - ); - } - test_field_init_qp_minus26(); - fn test_field_diff_cu_qp_delta_depth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).diff_cu_qp_delta_depth) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(diff_cu_qp_delta_depth) - ) - ); - } - test_field_diff_cu_qp_delta_depth(); - fn test_field_pps_cb_qp_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_cb_qp_offset) as usize - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_cb_qp_offset) - ) - ); - } - test_field_pps_cb_qp_offset(); - fn test_field_pps_cr_qp_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_cr_qp_offset) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_cr_qp_offset) - ) - ); - } - test_field_pps_cr_qp_offset(); - fn test_field_num_tile_columns_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_tile_columns_minus1) as usize - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_tile_columns_minus1) - ) - ); - } - test_field_num_tile_columns_minus1(); - fn test_field_num_tile_rows_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_tile_rows_minus1) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_tile_rows_minus1) - ) - ); - } - test_field_num_tile_rows_minus1(); - fn test_field_column_width_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).column_width_minus1) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(column_width_minus1) - ) - ); - } - test_field_column_width_minus1(); - fn test_field_row_height_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).row_height_minus1) as usize - ptr as usize - }, - 54usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(row_height_minus1) - ) - ); - } - test_field_row_height_minus1(); - fn test_field_pps_beta_offset_div2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_beta_offset_div2) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_beta_offset_div2) - ) - ); - } - test_field_pps_beta_offset_div2(); - fn test_field_pps_tc_offset_div2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_tc_offset_div2) as usize - ptr as usize - }, - 97usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_tc_offset_div2) - ) - ); - } - test_field_pps_tc_offset_div2(); - fn test_field_log2_parallel_merge_level_minus2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_parallel_merge_level_minus2) as usize - - ptr as usize - }, - 98usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_parallel_merge_level_minus2) - ) - ); - } - test_field_log2_parallel_merge_level_minus2(); - fn test_field_pScalingLists() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - } - test_field_pScalingLists(); - fn test_field_log2_max_transform_skip_block_size_minus2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_max_transform_skip_block_size_minus2) as usize - - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_max_transform_skip_block_size_minus2) - ) - ); - } - test_field_log2_max_transform_skip_block_size_minus2(); - fn test_field_diff_cu_chroma_qp_offset_depth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).diff_cu_chroma_qp_offset_depth) as usize - ptr as usize - }, - 113usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(diff_cu_chroma_qp_offset_depth) - ) - ); - } - test_field_diff_cu_chroma_qp_offset_depth(); - fn test_field_chroma_qp_offset_list_len_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_qp_offset_list_len_minus1) as usize - - ptr as usize - }, - 114usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(chroma_qp_offset_list_len_minus1) - ) - ); - } - test_field_chroma_qp_offset_list_len_minus1(); - fn test_field_cb_qp_offset_list() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cb_qp_offset_list) as usize - ptr as usize - }, - 115usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(cb_qp_offset_list) - ) - ); - } - test_field_cb_qp_offset_list(); - fn test_field_cr_qp_offset_list() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cr_qp_offset_list) as usize - ptr as usize - }, - 121usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(cr_qp_offset_list) - ) - ); - } - test_field_cr_qp_offset_list(); - fn test_field_log2_sao_offset_scale_luma() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_sao_offset_scale_luma) as usize - ptr as usize - }, - 127usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_sao_offset_scale_luma) - ) - ); - } - test_field_log2_sao_offset_scale_luma(); - fn test_field_log2_sao_offset_scale_chroma() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).log2_sao_offset_scale_chroma) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_sao_offset_scale_chroma) - ) - ); - } - test_field_log2_sao_offset_scale_chroma(); - fn test_field_pps_act_y_qp_offset_plus5() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_act_y_qp_offset_plus5) as usize - ptr as usize - }, - 129usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_act_y_qp_offset_plus5) - ) - ); - } - test_field_pps_act_y_qp_offset_plus5(); - fn test_field_pps_act_cb_qp_offset_plus5() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_act_cb_qp_offset_plus5) as usize - ptr as usize - }, - 130usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_act_cb_qp_offset_plus5) - ) - ); - } - test_field_pps_act_cb_qp_offset_plus5(); - fn test_field_pps_act_cr_qp_offset_plus5() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_act_cr_qp_offset_plus5) as usize - ptr as usize - }, - 131usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_act_cr_qp_offset_plus5) - ) - ); - } - test_field_pps_act_cr_qp_offset_plus5(); - fn test_field_pps_num_palette_predictor_initializer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_num_palette_predictor_initializer) as usize - - ptr as usize - }, - 132usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_num_palette_predictor_initializer) - ) - ); - } - test_field_pps_num_palette_predictor_initializer(); - fn test_field_luma_bit_depth_entry_minus8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_bit_depth_entry_minus8) as usize - ptr as usize - }, - 133usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(luma_bit_depth_entry_minus8) - ) - ); - } - test_field_luma_bit_depth_entry_minus8(); - fn test_field_chroma_bit_depth_entry_minus8() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_bit_depth_entry_minus8) as usize - ptr as usize - }, - 134usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(chroma_bit_depth_entry_minus8) - ) - ); - } - test_field_chroma_bit_depth_entry_minus8(); - fn test_field_pPredictorPaletteEntries() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pPredictorPaletteEntries) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pPredictorPaletteEntries) - ) - ); - } - test_field_pPredictorPaletteEntries(); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoDecodeH265PictureInfoFlags { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout_StdVideoDecodeH265PictureInfoFlags() { assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(StdVideoDecodeH265PictureInfoFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(flags) + ) ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).pps_pic_parameter_set_id) as usize - ptr as usize }, 4usize, concat!( - "Alignment of ", - stringify!(StdVideoDecodeH265PictureInfoFlags) + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_pic_parameter_set_id) ) ); -} -impl StdVideoDecodeH265PictureInfoFlags { - #[inline] - pub fn IrapPicFlag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_IrapPicFlag(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IdrPicFlag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_IdrPicFlag(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsReference(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsReference(&mut self, val: u32) { + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_seq_parameter_set_id) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_extra_slice_header_bits) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(num_extra_slice_header_bits) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn short_term_ref_pic_set_sps_flag(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_short_term_ref_pic_set_sps_flag(&mut self, val: u32) { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize + - ptr as usize + }, + 7usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(num_ref_idx_l0_default_active_minus1) + ) + ); + assert_eq!( unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - IrapPicFlag: u32, - IdrPicFlag: u32, - IsReference: u32, - short_term_ref_pic_set_sps_flag: u32, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let IrapPicFlag: u32 = unsafe { ::std::mem::transmute(IrapPicFlag) }; - IrapPicFlag as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let IdrPicFlag: u32 = unsafe { ::std::mem::transmute(IdrPicFlag) }; - IdrPicFlag as u64 + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize + - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(num_ref_idx_l1_default_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).init_qp_minus26) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(init_qp_minus26) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).diff_cu_qp_delta_depth) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(diff_cu_qp_delta_depth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_cb_qp_offset) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_cr_qp_offset) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_tile_columns_minus1) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(num_tile_columns_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_tile_rows_minus1) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(num_tile_rows_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).column_width_minus1) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(column_width_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).row_height_minus1) as usize - ptr as usize }, + 54usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(row_height_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_beta_offset_div2) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_beta_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_tc_offset_div2) as usize - ptr as usize }, + 97usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_tc_offset_div2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_parallel_merge_level_minus2) as usize - ptr as usize + }, + 98usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(log2_parallel_merge_level_minus2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pScalingLists) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pScalingLists) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_max_transform_skip_block_size_minus2) as usize + - ptr as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(log2_max_transform_skip_block_size_minus2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).diff_cu_chroma_qp_offset_depth) as usize - ptr as usize + }, + 113usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(diff_cu_chroma_qp_offset_depth) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).chroma_qp_offset_list_len_minus1) as usize - ptr as usize + }, + 114usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(chroma_qp_offset_list_len_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cb_qp_offset_list) as usize - ptr as usize }, + 115usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(cb_qp_offset_list) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cr_qp_offset_list) as usize - ptr as usize }, + 121usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(cr_qp_offset_list) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).log2_sao_offset_scale_luma) as usize - ptr as usize }, + 127usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(log2_sao_offset_scale_luma) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_sao_offset_scale_chroma) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(log2_sao_offset_scale_chroma) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_act_y_qp_offset_plus5) as usize - ptr as usize }, + 129usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_act_y_qp_offset_plus5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_act_cb_qp_offset_plus5) as usize - ptr as usize }, + 130usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_act_cb_qp_offset_plus5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_act_cr_qp_offset_plus5) as usize - ptr as usize }, + 131usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_act_cr_qp_offset_plus5) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pps_num_palette_predictor_initializer) as usize + - ptr as usize + }, + 132usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pps_num_palette_predictor_initializer) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_bit_depth_entry_minus8) as usize - ptr as usize }, + 133usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(luma_bit_depth_entry_minus8) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).chroma_bit_depth_entry_minus8) as usize - ptr as usize + }, + 134usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(chroma_bit_depth_entry_minus8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pPredictorPaletteEntries) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(pPredictorPaletteEntries) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH265PictureInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoDecodeH265PictureInfoFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH265PictureInfoFlags) + ) + ); +} +impl StdVideoDecodeH265PictureInfoFlags { + #[inline] + pub fn IrapPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_IrapPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn IdrPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_IdrPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn IsReference(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_IsReference(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn short_term_ref_pic_set_sps_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_short_term_ref_pic_set_sps_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + IrapPicFlag: u32, + IdrPicFlag: u32, + IsReference: u32, + short_term_ref_pic_set_sps_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let IrapPicFlag: u32 = unsafe { ::std::mem::transmute(IrapPicFlag) }; + IrapPicFlag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let IdrPicFlag: u32 = unsafe { ::std::mem::transmute(IdrPicFlag) }; + IdrPicFlag as u64 }); __bindgen_bitfield_unit.set(2usize, 1u8, { let IsReference: u32 = unsafe { ::std::mem::transmute(IsReference) }; @@ -7309,6 +5884,9 @@ pub struct StdVideoDecodeH265PictureInfo { } #[test] fn bindgen_test_layout_StdVideoDecodeH265PictureInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -7319,193 +5897,118 @@ fn bindgen_test_layout_StdVideoDecodeH265PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH265PictureInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_sps_video_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sps_video_parameter_set_id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(sps_video_parameter_set_id) - ) - ); - } - test_field_sps_video_parameter_set_id(); - fn test_field_pps_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_seq_parameter_set_id) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(pps_seq_parameter_set_id) - ) - ); - } - test_field_pps_seq_parameter_set_id(); - fn test_field_pps_pic_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_pic_parameter_set_id) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(pps_pic_parameter_set_id) - ) - ); - } - test_field_pps_pic_parameter_set_id(); - fn test_field_num_short_term_ref_pic_sets() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(num_short_term_ref_pic_sets) - ) - ); - } - test_field_num_short_term_ref_pic_sets(); - fn test_field_PicOrderCntVal() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - } - test_field_PicOrderCntVal(); - fn test_field_NumBitsForSTRefPicSetInSlice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).NumBitsForSTRefPicSetInSlice) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(NumBitsForSTRefPicSetInSlice) - ) - ); - } - test_field_NumBitsForSTRefPicSetInSlice(); - fn test_field_NumDeltaPocsOfRefRpsIdx() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).NumDeltaPocsOfRefRpsIdx) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(NumDeltaPocsOfRefRpsIdx) - ) - ); - } - test_field_NumDeltaPocsOfRefRpsIdx(); - fn test_field_RefPicSetStCurrBefore() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).RefPicSetStCurrBefore) as usize - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(RefPicSetStCurrBefore) - ) - ); - } - test_field_RefPicSetStCurrBefore(); - fn test_field_RefPicSetStCurrAfter() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).RefPicSetStCurrAfter) as usize - ptr as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(RefPicSetStCurrAfter) - ) - ); - } - test_field_RefPicSetStCurrAfter(); - fn test_field_RefPicSetLtCurr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).RefPicSetLtCurr) as usize - ptr as usize - }, - 31usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(RefPicSetLtCurr) - ) - ); - } - test_field_RefPicSetLtCurr(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_video_parameter_set_id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(sps_video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_seq_parameter_set_id) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(pps_seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_pic_parameter_set_id) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(pps_pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(num_short_term_ref_pic_sets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(PicOrderCntVal) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).NumBitsForSTRefPicSetInSlice) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(NumBitsForSTRefPicSetInSlice) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).NumDeltaPocsOfRefRpsIdx) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(NumDeltaPocsOfRefRpsIdx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).RefPicSetStCurrBefore) as usize - ptr as usize }, + 15usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(RefPicSetStCurrBefore) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).RefPicSetStCurrAfter) as usize - ptr as usize }, + 23usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(RefPicSetStCurrAfter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).RefPicSetLtCurr) as usize - ptr as usize }, + 31usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(RefPicSetLtCurr) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -7599,6 +6102,9 @@ pub struct StdVideoDecodeH265ReferenceInfo { } #[test] fn bindgen_test_layout_StdVideoDecodeH265ReferenceInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -7609,40 +6115,26 @@ fn bindgen_test_layout_StdVideoDecodeH265ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH265ReferenceInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265ReferenceInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_PicOrderCntVal() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265ReferenceInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - } - test_field_PicOrderCntVal(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265ReferenceInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265ReferenceInfo), + "::", + stringify!(PicOrderCntVal) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7654,91 +6146,62 @@ pub struct StdVideoEncodeH264WeightTableFlags { } #[test] fn bindgen_test_layout_StdVideoEncodeH264WeightTableFlags() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264WeightTableFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoEncodeH264WeightTableFlags) + ) + ); assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(StdVideoEncodeH264WeightTableFlags)) + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight_l0_flag) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTableFlags), + "::", + stringify!(luma_weight_l0_flag) + ) ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight_l0_flag) as usize - ptr as usize }, 4usize, concat!( - "Alignment of ", - stringify!(StdVideoEncodeH264WeightTableFlags) + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTableFlags), + "::", + stringify!(chroma_weight_l0_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight_l1_flag) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTableFlags), + "::", + stringify!(luma_weight_l1_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight_l1_flag) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTableFlags), + "::", + stringify!(chroma_weight_l1_flag) ) ); - fn test_field_luma_weight_l0_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_weight_l0_flag) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(luma_weight_l0_flag) - ) - ); - } - test_field_luma_weight_l0_flag(); - fn test_field_chroma_weight_l0_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_weight_l0_flag) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(chroma_weight_l0_flag) - ) - ); - } - test_field_chroma_weight_l0_flag(); - fn test_field_luma_weight_l1_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_weight_l1_flag) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(luma_weight_l1_flag) - ) - ); - } - test_field_luma_weight_l1_flag(); - fn test_field_chroma_weight_l1_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_weight_l1_flag) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(chroma_weight_l1_flag) - ) - ); - } - test_field_chroma_weight_l1_flag(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7757,6 +6220,9 @@ pub struct StdVideoEncodeH264WeightTable { } #[test] fn bindgen_test_layout_StdVideoEncodeH264WeightTable() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 404usize, @@ -7767,193 +6233,116 @@ fn bindgen_test_layout_StdVideoEncodeH264WeightTable() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264WeightTable)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_luma_log2_weight_denom() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_log2_weight_denom) - ) - ); - } - test_field_luma_log2_weight_denom(); - fn test_field_chroma_log2_weight_denom() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_log2_weight_denom) as usize - ptr as usize - }, - 17usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_log2_weight_denom) - ) - ); - } - test_field_chroma_log2_weight_denom(); - fn test_field_luma_weight_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_weight_l0) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_weight_l0) - ) - ); - } - test_field_luma_weight_l0(); - fn test_field_luma_offset_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_offset_l0) as usize - ptr as usize - }, - 50usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_offset_l0) - ) - ); - } - test_field_luma_offset_l0(); - fn test_field_chroma_weight_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_weight_l0) as usize - ptr as usize - }, - 82usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_weight_l0) - ) - ); - } - test_field_chroma_weight_l0(); - fn test_field_chroma_offset_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_offset_l0) as usize - ptr as usize - }, - 146usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_offset_l0) - ) - ); - } - test_field_chroma_offset_l0(); - fn test_field_luma_weight_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_weight_l1) as usize - ptr as usize - }, - 210usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_weight_l1) - ) - ); - } - test_field_luma_weight_l1(); - fn test_field_luma_offset_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_offset_l1) as usize - ptr as usize - }, - 242usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_offset_l1) - ) - ); - } - test_field_luma_offset_l1(); - fn test_field_chroma_weight_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_weight_l1) as usize - ptr as usize - }, - 274usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_weight_l1) - ) - ); - } - test_field_chroma_weight_l1(); - fn test_field_chroma_offset_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_offset_l1) as usize - ptr as usize - }, - 338usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_offset_l1) - ) - ); - } - test_field_chroma_offset_l1(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(luma_log2_weight_denom) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_log2_weight_denom) as usize - ptr as usize }, + 17usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(chroma_log2_weight_denom) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight_l0) as usize - ptr as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(luma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l0) as usize - ptr as usize }, + 50usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(luma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight_l0) as usize - ptr as usize }, + 82usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(chroma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset_l0) as usize - ptr as usize }, + 146usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(chroma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight_l1) as usize - ptr as usize }, + 210usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(luma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l1) as usize - ptr as usize }, + 242usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(luma_offset_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight_l1) as usize - ptr as usize }, + 274usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(chroma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset_l1) as usize - ptr as usize }, + 338usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264WeightTable), + "::", + stringify!(chroma_offset_l1) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -8277,6 +6666,9 @@ pub struct StdVideoEncodeH264RefListModEntry { } #[test] fn bindgen_test_layout_StdVideoEncodeH264RefListModEntry() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8290,57 +6682,38 @@ fn bindgen_test_layout_StdVideoEncodeH264RefListModEntry() { stringify!(StdVideoEncodeH264RefListModEntry) ) ); - fn test_field_modification_of_pic_nums_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).modification_of_pic_nums_idc) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefListModEntry), - "::", - stringify!(modification_of_pic_nums_idc) - ) - ); - } - test_field_modification_of_pic_nums_idc(); - fn test_field_abs_diff_pic_num_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).abs_diff_pic_num_minus1) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefListModEntry), - "::", - stringify!(abs_diff_pic_num_minus1) - ) - ); - } - test_field_abs_diff_pic_num_minus1(); - fn test_field_long_term_pic_num() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefListModEntry), - "::", - stringify!(long_term_pic_num) - ) - ); - } - test_field_long_term_pic_num(); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).modification_of_pic_nums_idc) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefListModEntry), + "::", + stringify!(modification_of_pic_nums_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).abs_diff_pic_num_minus1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefListModEntry), + "::", + stringify!(abs_diff_pic_num_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefListModEntry), + "::", + stringify!(long_term_pic_num) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8353,6 +6726,9 @@ pub struct StdVideoEncodeH264RefPicMarkingEntry { } #[test] fn bindgen_test_layout_StdVideoEncodeH264RefPicMarkingEntry() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -8369,96 +6745,60 @@ fn bindgen_test_layout_StdVideoEncodeH264RefPicMarkingEntry() { stringify!(StdVideoEncodeH264RefPicMarkingEntry) ) ); - fn test_field_operation() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).operation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(operation) - ) - ); - } - test_field_operation(); - fn test_field_difference_of_pic_nums_minus1() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).difference_of_pic_nums_minus1) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(difference_of_pic_nums_minus1) - ) - ); - } - test_field_difference_of_pic_nums_minus1(); - fn test_field_long_term_pic_num() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(long_term_pic_num) - ) - ); - } - test_field_long_term_pic_num(); - fn test_field_long_term_frame_idx() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).long_term_frame_idx) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(long_term_frame_idx) - ) - ); - } - test_field_long_term_frame_idx(); - fn test_field_max_long_term_frame_idx_plus1() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).max_long_term_frame_idx_plus1) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(max_long_term_frame_idx_plus1) - ) - ); - } - test_field_max_long_term_frame_idx_plus1(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).operation) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefPicMarkingEntry), + "::", + stringify!(operation) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).difference_of_pic_nums_minus1) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefPicMarkingEntry), + "::", + stringify!(difference_of_pic_nums_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefPicMarkingEntry), + "::", + stringify!(long_term_pic_num) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_frame_idx) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefPicMarkingEntry), + "::", + stringify!(long_term_frame_idx) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_long_term_frame_idx_plus1) as usize - ptr as usize + }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefPicMarkingEntry), + "::", + stringify!(max_long_term_frame_idx_plus1) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8473,6 +6813,9 @@ pub struct StdVideoEncodeH264RefMemMgmtCtrlOperations { } #[test] fn bindgen_test_layout_StdVideoEncodeH264RefMemMgmtCtrlOperations() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -8489,132 +6832,76 @@ fn bindgen_test_layout_StdVideoEncodeH264RefMemMgmtCtrlOperations() { stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_refList0ModOpCount() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).refList0ModOpCount) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(refList0ModOpCount) - ) - ); - } - test_field_refList0ModOpCount(); - fn test_field_pRefList0ModOperations() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pRefList0ModOperations) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(pRefList0ModOperations) - ) - ); - } - test_field_pRefList0ModOperations(); - fn test_field_refList1ModOpCount() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).refList1ModOpCount) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(refList1ModOpCount) - ) - ); - } - test_field_refList1ModOpCount(); - fn test_field_pRefList1ModOperations() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pRefList1ModOperations) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(pRefList1ModOperations) - ) - ); - } - test_field_pRefList1ModOperations(); - fn test_field_refPicMarkingOpCount() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).refPicMarkingOpCount) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(refPicMarkingOpCount) - ) - ); - } - test_field_refPicMarkingOpCount(); - fn test_field_pRefPicMarkingOperations() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pRefPicMarkingOperations) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(pRefPicMarkingOperations) - ) - ); - } - test_field_pRefPicMarkingOperations(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refList0ModOpCount) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(refList0ModOpCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefList0ModOperations) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(pRefList0ModOperations) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refList1ModOpCount) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(refList1ModOpCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefList1ModOperations) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(pRefList1ModOperations) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).refPicMarkingOpCount) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(refPicMarkingOpCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pRefPicMarkingOperations) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), + "::", + stringify!(pRefPicMarkingOperations) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8628,6 +6915,9 @@ pub struct StdVideoEncodeH264PictureInfo { } #[test] fn bindgen_test_layout_StdVideoEncodeH264PictureInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -8638,108 +6928,66 @@ fn bindgen_test_layout_StdVideoEncodeH264PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264PictureInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(seq_parameter_set_id) - ) - ); - } - test_field_seq_parameter_set_id(); - fn test_field_pic_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(pic_parameter_set_id) - ) - ); - } - test_field_pic_parameter_set_id(); - fn test_field_pictureType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pictureType) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(pictureType) - ) - ); - } - test_field_pictureType(); - fn test_field_frame_num() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(frame_num) - ) - ); - } - test_field_frame_num(); - fn test_field_PicOrderCnt() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(PicOrderCnt) - ) - ); - } - test_field_PicOrderCnt(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pictureType) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(pictureType) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(frame_num) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(PicOrderCnt) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8752,6 +7000,9 @@ pub struct StdVideoEncodeH264ReferenceInfo { } #[test] fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -8762,306 +7013,203 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264ReferenceInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_FrameNum() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).FrameNum) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(FrameNum) - ) - ); - } - test_field_FrameNum(); - fn test_field_PicOrderCnt() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(PicOrderCnt) - ) - ); - } - test_field_PicOrderCnt(); - fn test_field_long_term_pic_num() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(long_term_pic_num) - ) - ); - } - test_field_long_term_pic_num(); - fn test_field_long_term_frame_idx() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).long_term_frame_idx) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(long_term_frame_idx) - ) - ); - } - test_field_long_term_frame_idx(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct StdVideoEncodeH264SliceHeader { - pub flags: StdVideoEncodeH264SliceHeaderFlags, - pub first_mb_in_slice: u32, - pub slice_type: StdVideoH264SliceType, - pub idr_pic_id: u16, - pub num_ref_idx_l0_active_minus1: u8, - pub num_ref_idx_l1_active_minus1: u8, - pub cabac_init_idc: StdVideoH264CabacInitIdc, - pub disable_deblocking_filter_idc: StdVideoH264DisableDeblockingFilterIdc, - pub slice_alpha_c0_offset_div2: i8, - pub slice_beta_offset_div2: i8, - pub pWeightTable: *const StdVideoEncodeH264WeightTable, -} -#[test] -fn bindgen_test_layout_StdVideoEncodeH264SliceHeader() { assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(StdVideoEncodeH264SliceHeader)) + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).FrameNum) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceInfo), + "::", + stringify!(FrameNum) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCnt) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceInfo), + "::", + stringify!(PicOrderCnt) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_pic_num) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceInfo), + "::", + stringify!(long_term_pic_num) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_frame_idx) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264ReferenceInfo), + "::", + stringify!(long_term_frame_idx) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264SliceHeader { + pub flags: StdVideoEncodeH264SliceHeaderFlags, + pub first_mb_in_slice: u32, + pub slice_type: StdVideoH264SliceType, + pub idr_pic_id: u16, + pub num_ref_idx_l0_active_minus1: u8, + pub num_ref_idx_l1_active_minus1: u8, + pub cabac_init_idc: StdVideoH264CabacInitIdc, + pub disable_deblocking_filter_idc: StdVideoH264DisableDeblockingFilterIdc, + pub slice_alpha_c0_offset_div2: i8, + pub slice_beta_offset_div2: i8, + pub pWeightTable: *const StdVideoEncodeH264WeightTable, +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264SliceHeader() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264SliceHeader)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(StdVideoEncodeH264SliceHeader)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first_mb_in_slice) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(first_mb_in_slice) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(slice_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).idr_pic_id) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(idr_pic_id) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize + }, + 14usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(num_ref_idx_l0_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize + }, + 15usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(num_ref_idx_l1_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cabac_init_idc) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(cabac_init_idc) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).disable_deblocking_filter_idc) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(disable_deblocking_filter_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_alpha_c0_offset_div2) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(slice_alpha_c0_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(slice_beta_offset_div2) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(StdVideoEncodeH264SliceHeader)) + unsafe { ::std::ptr::addr_of!((*ptr).pWeightTable) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(pWeightTable) + ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_first_mb_in_slice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).first_mb_in_slice) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(first_mb_in_slice) - ) - ); - } - test_field_first_mb_in_slice(); - fn test_field_slice_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(slice_type) - ) - ); - } - test_field_slice_type(); - fn test_field_idr_pic_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).idr_pic_id) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(idr_pic_id) - ) - ); - } - test_field_idr_pic_id(); - fn test_field_num_ref_idx_l0_active_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(num_ref_idx_l0_active_minus1) - ) - ); - } - test_field_num_ref_idx_l0_active_minus1(); - fn test_field_num_ref_idx_l1_active_minus1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(num_ref_idx_l1_active_minus1) - ) - ); - } - test_field_num_ref_idx_l1_active_minus1(); - fn test_field_cabac_init_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cabac_init_idc) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(cabac_init_idc) - ) - ); - } - test_field_cabac_init_idc(); - fn test_field_disable_deblocking_filter_idc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).disable_deblocking_filter_idc) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(disable_deblocking_filter_idc) - ) - ); - } - test_field_disable_deblocking_filter_idc(); - fn test_field_slice_alpha_c0_offset_div2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_alpha_c0_offset_div2) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(slice_alpha_c0_offset_div2) - ) - ); - } - test_field_slice_alpha_c0_offset_div2(); - fn test_field_slice_beta_offset_div2() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(slice_beta_offset_div2) - ) - ); - } - test_field_slice_beta_offset_div2(); - fn test_field_pWeightTable() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pWeightTable) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(pWeightTable) - ) - ); - } - test_field_pWeightTable(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9073,6 +7221,9 @@ pub struct StdVideoEncodeH265WeightTableFlags { } #[test] fn bindgen_test_layout_StdVideoEncodeH265WeightTableFlags() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -9086,78 +7237,46 @@ fn bindgen_test_layout_StdVideoEncodeH265WeightTableFlags() { stringify!(StdVideoEncodeH265WeightTableFlags) ) ); - fn test_field_luma_weight_l0_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_weight_l0_flag) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(luma_weight_l0_flag) - ) - ); - } - test_field_luma_weight_l0_flag(); - fn test_field_chroma_weight_l0_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_weight_l0_flag) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(chroma_weight_l0_flag) - ) - ); - } - test_field_chroma_weight_l0_flag(); - fn test_field_luma_weight_l1_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_weight_l1_flag) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(luma_weight_l1_flag) - ) - ); - } - test_field_luma_weight_l1_flag(); - fn test_field_chroma_weight_l1_flag() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).chroma_weight_l1_flag) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(chroma_weight_l1_flag) - ) - ); - } - test_field_chroma_weight_l1_flag(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight_l0_flag) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTableFlags), + "::", + stringify!(luma_weight_l0_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight_l0_flag) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTableFlags), + "::", + stringify!(chroma_weight_l0_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight_l1_flag) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTableFlags), + "::", + stringify!(luma_weight_l1_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight_l1_flag) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTableFlags), + "::", + stringify!(chroma_weight_l1_flag) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9176,6 +7295,9 @@ pub struct StdVideoEncodeH265WeightTable { } #[test] fn bindgen_test_layout_StdVideoEncodeH265WeightTable() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 190usize, @@ -9186,193 +7308,118 @@ fn bindgen_test_layout_StdVideoEncodeH265WeightTable() { 2usize, concat!("Alignment of ", stringify!(StdVideoEncodeH265WeightTable)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_luma_log2_weight_denom() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(luma_log2_weight_denom) - ) - ); - } - test_field_luma_log2_weight_denom(); - fn test_field_delta_chroma_log2_weight_denom() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_chroma_log2_weight_denom) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_log2_weight_denom) - ) - ); - } - test_field_delta_chroma_log2_weight_denom(); - fn test_field_delta_luma_weight_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_luma_weight_l0) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_luma_weight_l0) - ) - ); - } - test_field_delta_luma_weight_l0(); - fn test_field_luma_offset_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_offset_l0) as usize - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(luma_offset_l0) - ) - ); - } - test_field_luma_offset_l0(); - fn test_field_delta_chroma_weight_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l0) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_weight_l0) - ) - ); - } - test_field_delta_chroma_weight_l0(); - fn test_field_delta_chroma_offset_l0() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_chroma_offset_l0) as usize - ptr as usize - }, - 70usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_offset_l0) - ) - ); - } - test_field_delta_chroma_offset_l0(); - fn test_field_delta_luma_weight_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_luma_weight_l1) as usize - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_luma_weight_l1) - ) - ); - } - test_field_delta_luma_weight_l1(); - fn test_field_luma_offset_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luma_offset_l1) as usize - ptr as usize - }, - 115usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(luma_offset_l1) - ) - ); - } - test_field_luma_offset_l1(); - fn test_field_delta_chroma_weight_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l1) as usize - ptr as usize - }, - 130usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_weight_l1) - ) - ); - } - test_field_delta_chroma_weight_l1(); - fn test_field_delta_chroma_offset_l1() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).delta_chroma_offset_l1) as usize - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_offset_l1) - ) - ); - } - test_field_delta_chroma_offset_l1(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(luma_log2_weight_denom) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).delta_chroma_log2_weight_denom) as usize - ptr as usize + }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_chroma_log2_weight_denom) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_luma_weight_l0) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_luma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l0) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(luma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l0) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_chroma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_offset_l0) as usize - ptr as usize }, + 70usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_chroma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_luma_weight_l1) as usize - ptr as usize }, + 100usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_luma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l1) as usize - ptr as usize }, + 115usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(luma_offset_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l1) as usize - ptr as usize }, + 130usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_chroma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_offset_l1) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265WeightTable), + "::", + stringify!(delta_chroma_offset_l1) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -9668,6 +7715,9 @@ pub struct StdVideoEncodeH265SliceSegmentHeader { } #[test] fn bindgen_test_layout_StdVideoEncodeH265SliceSegmentHeader() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -9684,348 +7734,200 @@ fn bindgen_test_layout_StdVideoEncodeH265SliceSegmentHeader() { stringify!(StdVideoEncodeH265SliceSegmentHeader) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_slice_type() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_type) - ) - ); - } - test_field_slice_type(); - fn test_field_num_short_term_ref_pic_sets() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_short_term_ref_pic_sets) - ) - ); - } - test_field_num_short_term_ref_pic_sets(); - fn test_field_slice_segment_address() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_segment_address) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_segment_address) - ) - ); - } - test_field_slice_segment_address(); - fn test_field_short_term_ref_pic_set_idx() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).short_term_ref_pic_set_idx) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(short_term_ref_pic_set_idx) - ) - ); - } - test_field_short_term_ref_pic_set_idx(); - fn test_field_num_long_term_sps() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_long_term_sps) as usize - ptr as usize - }, - 17usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_long_term_sps) - ) - ); - } - test_field_num_long_term_sps(); - fn test_field_num_long_term_pics() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_long_term_pics) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_long_term_pics) - ) - ); - } - test_field_num_long_term_pics(); - fn test_field_collocated_ref_idx() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).collocated_ref_idx) as usize - ptr as usize - }, - 19usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(collocated_ref_idx) - ) - ); - } - test_field_collocated_ref_idx(); - fn test_field_num_ref_idx_l0_active_minus1() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_ref_idx_l0_active_minus1) - ) - ); - } - test_field_num_ref_idx_l0_active_minus1(); - fn test_field_num_ref_idx_l1_active_minus1() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_ref_idx_l1_active_minus1) - ) - ); - } - test_field_num_ref_idx_l1_active_minus1(); - fn test_field_MaxNumMergeCand() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).MaxNumMergeCand) as usize - ptr as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(MaxNumMergeCand) - ) - ); - } - test_field_MaxNumMergeCand(); - fn test_field_slice_cb_qp_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_cb_qp_offset) as usize - ptr as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_cb_qp_offset) - ) - ); - } - test_field_slice_cb_qp_offset(); - fn test_field_slice_cr_qp_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_cr_qp_offset) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_cr_qp_offset) - ) - ); - } - test_field_slice_cr_qp_offset(); - fn test_field_slice_beta_offset_div2() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_beta_offset_div2) - ) - ); - } - test_field_slice_beta_offset_div2(); - fn test_field_slice_tc_offset_div2() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_tc_offset_div2) as usize - ptr as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_tc_offset_div2) - ) - ); - } - test_field_slice_tc_offset_div2(); - fn test_field_slice_act_y_qp_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_act_y_qp_offset) as usize - ptr as usize - }, - 27usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_act_y_qp_offset) - ) - ); - } - test_field_slice_act_y_qp_offset(); - fn test_field_slice_act_cb_qp_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_act_cb_qp_offset) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_act_cb_qp_offset) - ) - ); - } - test_field_slice_act_cb_qp_offset(); - fn test_field_slice_act_cr_qp_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).slice_act_cr_qp_offset) as usize - ptr as usize - }, - 29usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_act_cr_qp_offset) - ) - ); - } - test_field_slice_act_cr_qp_offset(); - fn test_field_pWeightTable() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pWeightTable) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(pWeightTable) - ) - ); - } - test_field_pWeightTable(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(num_short_term_ref_pic_sets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_segment_address) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_segment_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).short_term_ref_pic_set_idx) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(short_term_ref_pic_set_idx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_long_term_sps) as usize - ptr as usize }, + 17usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(num_long_term_sps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_long_term_pics) as usize - ptr as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(num_long_term_pics) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).collocated_ref_idx) as usize - ptr as usize }, + 19usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(collocated_ref_idx) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(num_ref_idx_l0_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize + }, + 21usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(num_ref_idx_l1_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).MaxNumMergeCand) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(MaxNumMergeCand) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_cb_qp_offset) as usize - ptr as usize }, + 23usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_cr_qp_offset) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_beta_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_tc_offset_div2) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_tc_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_y_qp_offset) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_act_y_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_cb_qp_offset) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_act_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_cr_qp_offset) as usize - ptr as usize }, + 29usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(slice_act_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pWeightTable) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265SliceSegmentHeader), + "::", + stringify!(pWeightTable) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -10107,6 +8009,9 @@ pub struct StdVideoEncodeH265ReferenceModifications { } #[test] fn bindgen_test_layout_StdVideoEncodeH265ReferenceModifications() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -10123,98 +8028,64 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceModifications() { stringify!(StdVideoEncodeH265ReferenceModifications) ) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_referenceList0ModificationsCount() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).referenceList0ModificationsCount) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(referenceList0ModificationsCount) - ) - ); - } - test_field_referenceList0ModificationsCount(); - fn test_field_pReferenceList0Modifications() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pReferenceList0Modifications) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(pReferenceList0Modifications) - ) - ); - } - test_field_pReferenceList0Modifications(); - fn test_field_referenceList1ModificationsCount() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).referenceList1ModificationsCount) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(referenceList1ModificationsCount) - ) - ); - } - test_field_referenceList1ModificationsCount(); - fn test_field_pReferenceList1Modifications() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pReferenceList1Modifications) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(pReferenceList1Modifications) - ) - ); - } - test_field_pReferenceList1Modifications(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceModifications), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).referenceList0ModificationsCount) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceModifications), + "::", + stringify!(referenceList0ModificationsCount) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pReferenceList0Modifications) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceModifications), + "::", + stringify!(pReferenceList0Modifications) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).referenceList1ModificationsCount) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceModifications), + "::", + stringify!(referenceList1ModificationsCount) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pReferenceList1Modifications) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceModifications), + "::", + stringify!(pReferenceList1Modifications) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -10341,6 +8212,9 @@ pub struct StdVideoEncodeH265PictureInfo { } #[test] fn bindgen_test_layout_StdVideoEncodeH265PictureInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -10351,125 +8225,76 @@ fn bindgen_test_layout_StdVideoEncodeH265PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH265PictureInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_PictureType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PictureType) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(PictureType) - ) - ); - } - test_field_PictureType(); - fn test_field_sps_video_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sps_video_parameter_set_id) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(sps_video_parameter_set_id) - ) - ); - } - test_field_sps_video_parameter_set_id(); - fn test_field_pps_seq_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_seq_parameter_set_id) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(pps_seq_parameter_set_id) - ) - ); - } - test_field_pps_seq_parameter_set_id(); - fn test_field_pps_pic_parameter_set_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pps_pic_parameter_set_id) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(pps_pic_parameter_set_id) - ) - ); - } - test_field_pps_pic_parameter_set_id(); - fn test_field_PicOrderCntVal() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - } - test_field_PicOrderCntVal(); - fn test_field_TemporalId() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(TemporalId) - ) - ); - } - test_field_TemporalId(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PictureType) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(PictureType) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_video_parameter_set_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(sps_video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_seq_parameter_set_id) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(pps_seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_pic_parameter_set_id) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(pps_pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(PicOrderCntVal) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265PictureInfo), + "::", + stringify!(TemporalId) + ) + ); } #[repr(C)] #[repr(align(4))] @@ -10548,6 +8373,9 @@ pub struct StdVideoEncodeH265ReferenceInfo { } #[test] fn bindgen_test_layout_StdVideoEncodeH265ReferenceInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -10558,55 +8386,34 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH265ReferenceInfo)) ); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceInfo), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_PicOrderCntVal() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - } - test_field_PicOrderCntVal(); - fn test_field_TemporalId() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceInfo), - "::", - stringify!(TemporalId) - ) - ); - } - test_field_TemporalId(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceInfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).PicOrderCntVal) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceInfo), + "::", + stringify!(PicOrderCntVal) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).TemporalId) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH265ReferenceInfo), + "::", + stringify!(TemporalId) + ) + ); } diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 79391fadb..e94c5d101 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Maik Klein "] edition = "2018" [dependencies] -bindgen = "0.60" +bindgen = "0.61" heck = "0.4" itertools = "0.10" nom = "7.1"