diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 611c5f3..27d45a5 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -28,8 +28,6 @@ mod prelude; pub use prelude::*; /// Native bindings from Vulkan headers, generated by bindgen #[allow(nonstandard_style)] -#[allow(deref_nullptr)] -#[allow(trivial_casts, trivial_numeric_casts)] pub mod native; mod platform_types; pub use platform_types::*; diff --git a/ash/src/vk/native.rs b/ash/src/vk/native.rs index 2c57c07..23e2ba8 100644 --- a/ash/src/vk/native.rs +++ b/ash/src/vk/native.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.58.1 */ +/* automatically generated by rust-bindgen 0.60.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -487,135 +487,177 @@ fn bindgen_test_layout_StdVideoH264HrdParameters() { 4usize, concat!("Alignment of ", stringify!(StdVideoH264HrdParameters)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_cnt_minus1 as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_cnt_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_rate_scale as *const _ - as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(bit_rate_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_size_scale as *const _ - as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_size_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_rate_value_minus1 as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(bit_rate_value_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_size_value_minus1 as *const _ - as usize - }, - 132usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_size_value_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cbr_flag as *const _ as usize - }, - 260usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cbr_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .initial_cpb_removal_delay_length_minus1 as *const _ as usize - }, - 292usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(initial_cpb_removal_delay_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_removal_delay_length_minus1 - as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(cpb_removal_delay_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dpb_output_delay_length_minus1 - as *const _ as usize - }, - 300usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(dpb_output_delay_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).time_offset_length as *const _ - as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264HrdParameters), - "::", - stringify!(time_offset_length) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -649,175 +691,240 @@ fn bindgen_test_layout_StdVideoH264SequenceParameterSetVui() { stringify!(StdVideoH264SequenceParameterSetVui) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).aspect_ratio_idc - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(aspect_ratio_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sar_width as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(sar_width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sar_height as *const _ - as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(sar_height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).video_format as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(video_format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).color_primaries - as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(color_primaries) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).transfer_characteristics - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(transfer_characteristics) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).matrix_coefficients - as *const _ as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(matrix_coefficients) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_units_in_tick - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(num_units_in_tick) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).time_scale as *const _ - as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(time_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pHrdParameters - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(pHrdParameters) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_num_reorder_frames - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(max_num_reorder_frames) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_dec_frame_buffering - as *const _ as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSetVui), - "::", - stringify!(max_dec_frame_buffering) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -1113,7 +1220,7 @@ impl StdVideoH264SpsFlags { } } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct StdVideoH264ScalingLists { pub scaling_list_present_mask: u8, pub use_default_scaling_matrix_mask: u8, @@ -1132,56 +1239,74 @@ fn bindgen_test_layout_StdVideoH264ScalingLists() { 1usize, concat!("Alignment of ", stringify!(StdVideoH264ScalingLists)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).scaling_list_present_mask - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(scaling_list_present_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).use_default_scaling_matrix_mask - as *const _ as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(use_default_scaling_matrix_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingList4x4 as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(ScalingList4x4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingList8x8 as *const _ as usize - }, - 98usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264ScalingLists), - "::", - stringify!(ScalingList8x8) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1225,304 +1350,399 @@ fn bindgen_test_layout_StdVideoH264SequenceParameterSet() { stringify!(StdVideoH264SequenceParameterSet) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).profile_idc as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(profile_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).level_idc as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(level_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_format_idc - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(chroma_format_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_luma_minus8 - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(bit_depth_luma_minus8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_chroma_minus8 - as *const _ as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(bit_depth_chroma_minus8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).log2_max_frame_num_minus4 - as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(log2_max_frame_num_minus4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_type - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pic_order_cnt_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_max_pic_order_cnt_lsb_minus4 as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(log2_max_pic_order_cnt_lsb_minus4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset_for_non_ref_pic - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(offset_for_non_ref_pic) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .offset_for_top_to_bottom_field as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(offset_for_top_to_bottom_field) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_frames_in_pic_order_cnt_cycle as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(num_ref_frames_in_pic_order_cnt_cycle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_num_ref_frames - as *const _ as usize - }, - 41usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(max_num_ref_frames) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_width_in_mbs_minus1 - as *const _ as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pic_width_in_mbs_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pic_height_in_map_units_minus1 as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pic_height_in_map_units_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_crop_left_offset - as *const _ as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_left_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_crop_right_offset - as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_right_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_crop_top_offset - as *const _ as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_top_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_crop_bottom_offset - as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(frame_crop_bottom_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pOffsetForRefFrame - as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pOffsetForRefFrame) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pScalingLists as *const _ - as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSequenceParameterSetVui - as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264SequenceParameterSet), - "::", - stringify!(pSequenceParameterSetVui) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -1732,148 +1952,195 @@ fn bindgen_test_layout_StdVideoH264PictureParameterSet() { 8usize, concat!("Alignment of ", stringify!(StdVideoH264PictureParameterSet)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_parameter_set_id - as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pic_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_idx_l0_default_active_minus1 as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(num_ref_idx_l0_default_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_idx_l1_default_active_minus1 as *const _ as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(num_ref_idx_l1_default_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).weighted_bipred_idc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(weighted_bipred_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_init_qp_minus26 - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pic_init_qp_minus26) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_init_qs_minus26 - as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pic_init_qs_minus26) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_qp_index_offset - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(chroma_qp_index_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .second_chroma_qp_index_offset as *const _ as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(second_chroma_qp_index_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pScalingLists as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH264PictureParameterSet), - "::", - stringify!(pScalingLists) - ) - ); + 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))] @@ -2027,94 +2294,125 @@ fn bindgen_test_layout_StdVideoDecodeH264PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264PictureInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_parameter_set_id - as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(pic_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_num as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(frame_num) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).idr_pic_id as *const _ - as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(idr_pic_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCnt as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264PictureInfo), - "::", - stringify!(PicOrderCnt) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -2236,57 +2534,74 @@ fn bindgen_test_layout_StdVideoDecodeH264ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264ReferenceInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).FrameNum as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(FrameNum) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCnt as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264ReferenceInfo), - "::", - stringify!(PicOrderCnt) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -2397,171 +2712,227 @@ fn bindgen_test_layout_StdVideoDecodeH264MvcElement() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264MvcElement)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).viewOrderIndex as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewOrderIndex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).viewId as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewId) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).temporalId as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(temporalId) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).priorityId as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(priorityId) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numOfAnchorRefsInL0 as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfAnchorRefsInL0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).viewIdOfAnchorRefsInL0 - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfAnchorRefsInL0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numOfAnchorRefsInL1 as *const _ - as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfAnchorRefsInL1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).viewIdOfAnchorRefsInL1 - as *const _ as usize - }, - 46usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfAnchorRefsInL1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numOfNonAnchorRefsInL0 - as *const _ as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfNonAnchorRefsInL0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).viewIdOfNonAnchorRefsInL0 - as *const _ as usize - }, - 78usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfNonAnchorRefsInL0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numOfNonAnchorRefsInL1 - as *const _ as usize - }, - 108usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(numOfNonAnchorRefsInL1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).viewIdOfNonAnchorRefsInL1 - as *const _ as usize - }, - 110usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264MvcElement), - "::", - stringify!(viewIdOfNonAnchorRefsInL1) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2582,40 +2953,57 @@ fn bindgen_test_layout_StdVideoDecodeH264Mvc() { 8usize, concat!("Alignment of ", stringify!(StdVideoDecodeH264Mvc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).viewId0 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264Mvc), - "::", - stringify!(viewId0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mvcElementCount as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264Mvc), - "::", - stringify!(mvcElementCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pMvcElements as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH264Mvc), - "::", - stringify!(pMvcElements) - ) - ); + 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(); } pub const StdVideoH265ProfileIdc_STD_VIDEO_H265_PROFILE_IDC_MAIN: StdVideoH265ProfileIdc = 1; pub const StdVideoH265ProfileIdc_STD_VIDEO_H265_PROFILE_IDC_MAIN_10: StdVideoH265ProfileIdc = 2; @@ -2675,45 +3063,57 @@ fn bindgen_test_layout_StdVideoH265DecPicBufMgr() { 4usize, concat!("Alignment of ", stringify!(StdVideoH265DecPicBufMgr)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_latency_increase_plus1 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265DecPicBufMgr), - "::", - stringify!(max_latency_increase_plus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_dec_pic_buffering_minus1 - as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265DecPicBufMgr), - "::", - stringify!(max_dec_pic_buffering_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_num_reorder_pics as *const _ - as usize - }, - 35usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265DecPicBufMgr), - "::", - stringify!(max_num_reorder_pics) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2739,71 +3139,91 @@ fn bindgen_test_layout_StdVideoH265SubLayerHrdParameters() { stringify!(StdVideoH265SubLayerHrdParameters) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_rate_value_minus1 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(bit_rate_value_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_size_value_minus1 - as *const _ as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(cpb_size_value_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_size_du_value_minus1 - as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(cpb_size_du_value_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_rate_du_value_minus1 - as *const _ as usize - }, - 384usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(bit_rate_du_value_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cbr_flag as *const _ - as usize - }, - 512usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SubLayerHrdParameters), - "::", - stringify!(cbr_flag) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -2981,185 +3401,248 @@ fn bindgen_test_layout_StdVideoH265HrdParameters() { 8usize, concat!("Alignment of ", stringify!(StdVideoH265HrdParameters)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).tick_divisor_minus2 as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(tick_divisor_minus2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .du_cpb_removal_delay_increment_length_minus1 as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(du_cpb_removal_delay_increment_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dpb_output_delay_du_length_minus1 - as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(dpb_output_delay_du_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_rate_scale as *const _ - as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(bit_rate_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_size_scale as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(cpb_size_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_size_du_scale as *const _ - as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(cpb_size_du_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .initial_cpb_removal_delay_length_minus1 as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(initial_cpb_removal_delay_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).au_cpb_removal_delay_length_minus1 - as *const _ as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(au_cpb_removal_delay_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dpb_output_delay_length_minus1 - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(dpb_output_delay_length_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cpb_cnt_minus1 as *const _ - as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(cpb_cnt_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).elemental_duration_in_tc_minus1 - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(elemental_duration_in_tc_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSubLayerHrdParametersNal - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(pSubLayerHrdParametersNal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSubLayerHrdParametersVcl - as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265HrdParameters), - "::", - stringify!(pSubLayerHrdParametersVcl) - ) - ); + 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))] @@ -3282,112 +3765,146 @@ fn bindgen_test_layout_StdVideoH265VideoParameterSet() { 8usize, concat!("Alignment of ", stringify!(StdVideoH265VideoParameterSet)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vps_video_parameter_set_id - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_video_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vps_max_sub_layers_minus1 - as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_max_sub_layers_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vps_num_units_in_tick - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_num_units_in_tick) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vps_time_scale as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_time_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .vps_num_ticks_poc_diff_one_minus1 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(vps_num_ticks_poc_diff_one_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDecPicBufMgr as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(pDecPicBufMgr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pHrdParameters as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265VideoParameterSet), - "::", - stringify!(pHrdParameters) - ) - ); + 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(); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct StdVideoH265ScalingLists { pub ScalingList4x4: [[u8; 16usize]; 6usize], pub ScalingList8x8: [[u8; 64usize]; 6usize], @@ -3408,82 +3925,108 @@ fn bindgen_test_layout_StdVideoH265ScalingLists() { 1usize, concat!("Alignment of ", stringify!(StdVideoH265ScalingLists)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingList4x4 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList4x4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingList8x8 as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList8x8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingList16x16 as *const _ - as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList16x16) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingList32x32 as *const _ - as usize - }, - 864usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingList32x32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingListDCCoef16x16 as *const _ - as usize - }, - 992usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingListDCCoef16x16) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ScalingListDCCoef32x32 as *const _ - as usize - }, - 998usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265ScalingLists), - "::", - stringify!(ScalingListDCCoef32x32) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -3861,308 +4404,426 @@ fn bindgen_test_layout_StdVideoH265SequenceParameterSetVui() { stringify!(StdVideoH265SequenceParameterSetVui) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).aspect_ratio_idc - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(aspect_ratio_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sar_width as *const _ - as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(sar_width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sar_height as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(sar_height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).video_format as *const _ - as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(video_format) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colour_primaries - as *const _ as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(colour_primaries) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).transfer_characteristics - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(transfer_characteristics) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).matrix_coeffs - as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(matrix_coeffs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .chroma_sample_loc_type_top_field as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(chroma_sample_loc_type_top_field) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .chroma_sample_loc_type_bottom_field as *const _ as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(chroma_sample_loc_type_bottom_field) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).def_disp_win_left_offset - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_left_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .def_disp_win_right_offset as *const _ as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_right_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).def_disp_win_top_offset - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_top_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .def_disp_win_bottom_offset as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(def_disp_win_bottom_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vui_num_units_in_tick - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(vui_num_units_in_tick) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vui_time_scale - as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(vui_time_scale) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .vui_num_ticks_poc_diff_one_minus1 as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(vui_num_ticks_poc_diff_one_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pHrdParameters - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(pHrdParameters) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .min_spatial_segmentation_idc as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(min_spatial_segmentation_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_bytes_per_pic_denom - as *const _ as usize - }, - 50usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(max_bytes_per_pic_denom) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .max_bits_per_min_cu_denom as *const _ as usize - }, - 51usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(max_bits_per_min_cu_denom) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_max_mv_length_horizontal as *const _ as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(log2_max_mv_length_horizontal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_max_mv_length_vertical as *const _ as usize - }, - 53usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSetVui), - "::", - stringify!(log2_max_mv_length_vertical) - ) - ); + 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(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct StdVideoH265PredictorPaletteEntries { pub PredictorPaletteEntries: [[u16; 128usize]; 3usize], } @@ -4181,19 +4842,24 @@ fn bindgen_test_layout_StdVideoH265PredictorPaletteEntries() { stringify!(StdVideoH265PredictorPaletteEntries) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PredictorPaletteEntries - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PredictorPaletteEntries), - "::", - stringify!(PredictorPaletteEntries) - ) - ); + 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))] @@ -4752,473 +5418,632 @@ fn bindgen_test_layout_StdVideoH265SequenceParameterSet() { stringify!(StdVideoH265SequenceParameterSet) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).profile_idc as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(profile_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).level_idc as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(level_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_width_in_luma_samples - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pic_width_in_luma_samples) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_height_in_luma_samples - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pic_height_in_luma_samples) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sps_video_parameter_set_id - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_video_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sps_max_sub_layers_minus1 - as *const _ as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_max_sub_layers_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sps_seq_parameter_set_id - as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_format_idc - as *const _ as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(chroma_format_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_luma_minus8 - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(bit_depth_luma_minus8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_chroma_minus8 - as *const _ as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(bit_depth_chroma_minus8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_max_pic_order_cnt_lsb_minus4 as *const _ as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_max_pic_order_cnt_lsb_minus4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_min_luma_coding_block_size_minus3 as *const _ as usize - }, - 27usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_min_luma_coding_block_size_minus3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_diff_max_min_luma_coding_block_size as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_diff_max_min_luma_coding_block_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_min_luma_transform_block_size_minus2 as *const _ as usize - }, - 29usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_min_luma_transform_block_size_minus2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_diff_max_min_luma_transform_block_size as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_diff_max_min_luma_transform_block_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .max_transform_hierarchy_depth_inter as *const _ as usize - }, - 31usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(max_transform_hierarchy_depth_inter) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .max_transform_hierarchy_depth_intra as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(max_transform_hierarchy_depth_intra) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_short_term_ref_pic_sets - as *const _ as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(num_short_term_ref_pic_sets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_long_term_ref_pics_sps - as *const _ as usize - }, - 34usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(num_long_term_ref_pics_sps) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pcm_sample_bit_depth_luma_minus1 as *const _ as usize - }, - 35usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pcm_sample_bit_depth_luma_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pcm_sample_bit_depth_chroma_minus1 as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pcm_sample_bit_depth_chroma_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_min_pcm_luma_coding_block_size_minus3 as *const _ as usize - }, - 37usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_min_pcm_luma_coding_block_size_minus3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_diff_max_min_pcm_luma_coding_block_size as *const _ as usize - }, - 38usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(log2_diff_max_min_pcm_luma_coding_block_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).conf_win_left_offset - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_left_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).conf_win_right_offset - as *const _ as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_right_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).conf_win_top_offset - as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_top_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).conf_win_bottom_offset - as *const _ as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(conf_win_bottom_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDecPicBufMgr as *const _ - as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pDecPicBufMgr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pScalingLists as *const _ - as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSequenceParameterSetVui - as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pSequenceParameterSetVui) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).palette_max_size - as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(palette_max_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .delta_palette_max_predictor_size as *const _ as usize - }, - 81usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(delta_palette_max_predictor_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .motion_vector_resolution_control_idc as *const _ as usize - }, - 82usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(motion_vector_resolution_control_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .sps_num_palette_predictor_initializer_minus1 as *const _ as usize - }, - 83usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(sps_num_palette_predictor_initializer_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPredictorPaletteEntries - as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265SequenceParameterSet), - "::", - stringify!(pPredictorPaletteEntries) - ) - ); + 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))] @@ -5819,421 +6644,556 @@ fn bindgen_test_layout_StdVideoH265PictureParameterSet() { 8usize, concat!("Alignment of ", stringify!(StdVideoH265PictureParameterSet)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_pic_parameter_set_id - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_pic_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_seq_parameter_set_id - as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_extra_slice_header_bits - as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_extra_slice_header_bits) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_idx_l0_default_active_minus1 as *const _ as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_ref_idx_l0_default_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_idx_l1_default_active_minus1 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_ref_idx_l1_default_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).init_qp_minus26 as *const _ - as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(init_qp_minus26) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).diff_cu_qp_delta_depth - as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(diff_cu_qp_delta_depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_cb_qp_offset as *const _ - as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_cb_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_cr_qp_offset as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_cr_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_tile_columns_minus1 - as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_tile_columns_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_tile_rows_minus1 - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(num_tile_rows_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).column_width_minus1 - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(column_width_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).row_height_minus1 - as *const _ as usize - }, - 54usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(row_height_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_beta_offset_div2 - as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_beta_offset_div2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_tc_offset_div2 - as *const _ as usize - }, - 97usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_tc_offset_div2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_parallel_merge_level_minus2 as *const _ as usize - }, - 98usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_parallel_merge_level_minus2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pScalingLists as *const _ - as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pScalingLists) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .log2_max_transform_skip_block_size_minus2 as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_max_transform_skip_block_size_minus2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .diff_cu_chroma_qp_offset_depth as *const _ as usize - }, - 113usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(diff_cu_chroma_qp_offset_depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .chroma_qp_offset_list_len_minus1 as *const _ as usize - }, - 114usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(chroma_qp_offset_list_len_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cb_qp_offset_list - as *const _ as usize - }, - 115usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(cb_qp_offset_list) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cr_qp_offset_list - as *const _ as usize - }, - 121usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(cr_qp_offset_list) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).log2_sao_offset_scale_luma - as *const _ as usize - }, - 127usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_sao_offset_scale_luma) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).log2_sao_offset_scale_chroma - as *const _ as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(log2_sao_offset_scale_chroma) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_act_y_qp_offset_plus5 - as *const _ as usize - }, - 129usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_act_y_qp_offset_plus5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_act_cb_qp_offset_plus5 - as *const _ as usize - }, - 130usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_act_cb_qp_offset_plus5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_act_cr_qp_offset_plus5 - as *const _ as usize - }, - 131usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_act_cr_qp_offset_plus5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pps_num_palette_predictor_initializer as *const _ as usize - }, - 132usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pps_num_palette_predictor_initializer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_bit_depth_entry_minus8 - as *const _ as usize - }, - 133usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(luma_bit_depth_entry_minus8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .chroma_bit_depth_entry_minus8 as *const _ as usize - }, - 134usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(chroma_bit_depth_entry_minus8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPredictorPaletteEntries - as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(StdVideoH265PictureParameterSet), - "::", - stringify!(pPredictorPaletteEntries) - ) - ); + 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))] @@ -6359,148 +7319,193 @@ fn bindgen_test_layout_StdVideoDecodeH265PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH265PictureInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sps_video_parameter_set_id - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(sps_video_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_seq_parameter_set_id - as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(pps_seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_pic_parameter_set_id - as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(pps_pic_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_short_term_ref_pic_sets - as *const _ as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(num_short_term_ref_pic_sets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCntVal as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).NumBitsForSTRefPicSetInSlice - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(NumBitsForSTRefPicSetInSlice) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).NumDeltaPocsOfRefRpsIdx - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(NumDeltaPocsOfRefRpsIdx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).RefPicSetStCurrBefore - as *const _ as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(RefPicSetStCurrBefore) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).RefPicSetStCurrAfter - as *const _ as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(RefPicSetStCurrAfter) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).RefPicSetLtCurr as *const _ - as usize - }, - 31usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265PictureInfo), - "::", - stringify!(RefPicSetLtCurr) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -6604,31 +7609,40 @@ fn bindgen_test_layout_StdVideoDecodeH265ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoDecodeH265ReferenceInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265ReferenceInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCntVal as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoDecodeH265ReferenceInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6653,58 +7667,78 @@ fn bindgen_test_layout_StdVideoEncodeH264WeightTableFlags() { stringify!(StdVideoEncodeH264WeightTableFlags) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight_l0_flag - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(luma_weight_l0_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight_l0_flag - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(chroma_weight_l0_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight_l1_flag - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTableFlags), - "::", - stringify!(luma_weight_l1_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight_l1_flag - as *const _ 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)] @@ -6733,148 +7767,193 @@ fn bindgen_test_layout_StdVideoEncodeH264WeightTable() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264WeightTable)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_log2_weight_denom - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_log2_weight_denom) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_log2_weight_denom - as *const _ as usize - }, - 17usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_log2_weight_denom) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight_l0 as *const _ - as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_weight_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_offset_l0 as *const _ - as usize - }, - 50usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_offset_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight_l0 as *const _ - as usize - }, - 82usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_weight_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_offset_l0 as *const _ - as usize - }, - 146usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_offset_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight_l1 as *const _ - as usize - }, - 210usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_weight_l1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_offset_l1 as *const _ - as usize - }, - 242usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(luma_offset_l1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight_l1 as *const _ - as usize - }, - 274usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_weight_l1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_offset_l1 as *const _ - as usize - }, - 338usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264WeightTable), - "::", - stringify!(chroma_offset_l1) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -7211,45 +8290,57 @@ fn bindgen_test_layout_StdVideoEncodeH264RefListModEntry() { stringify!(StdVideoEncodeH264RefListModEntry) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .modification_of_pic_nums_idc as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefListModEntry), - "::", - stringify!(modification_of_pic_nums_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).abs_diff_pic_num_minus1 - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefListModEntry), - "::", - stringify!(abs_diff_pic_num_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).long_term_pic_num - as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefListModEntry), - "::", - stringify!(long_term_pic_num) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7278,71 +8369,96 @@ fn bindgen_test_layout_StdVideoEncodeH264RefPicMarkingEntry() { stringify!(StdVideoEncodeH264RefPicMarkingEntry) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).operation as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(operation) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .difference_of_pic_nums_minus1 as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(difference_of_pic_nums_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).long_term_pic_num - as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(long_term_pic_num) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).long_term_frame_idx - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(long_term_frame_idx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .max_long_term_frame_idx_plus1 as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefPicMarkingEntry), - "::", - stringify!(max_long_term_frame_idx_plus1) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7373,97 +8489,132 @@ fn bindgen_test_layout_StdVideoEncodeH264RefMemMgmtCtrlOperations() { stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .refList0ModOpCount as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(refList0ModOpCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pRefList0ModOperations as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(pRefList0ModOperations) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .refList1ModOpCount as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(refList1ModOpCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pRefList1ModOperations as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(pRefList1ModOperations) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .refPicMarkingOpCount as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(refPicMarkingOpCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pRefPicMarkingOperations as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations), - "::", - stringify!(pRefPicMarkingOperations) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7487,82 +8638,108 @@ fn bindgen_test_layout_StdVideoEncodeH264PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264PictureInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_parameter_set_id - as *const _ as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(pic_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pictureType as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(pictureType) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_num as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(frame_num) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCnt as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264PictureInfo), - "::", - stringify!(PicOrderCnt) - ) - ); + 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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7585,70 +8762,91 @@ fn bindgen_test_layout_StdVideoEncodeH264ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264ReferenceInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).FrameNum as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(FrameNum) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCnt as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(PicOrderCnt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).long_term_pic_num - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(long_term_pic_num) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).long_term_frame_idx - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264ReferenceInfo), - "::", - stringify!(long_term_frame_idx) - ) - ); + 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)] @@ -7677,148 +8875,193 @@ fn bindgen_test_layout_StdVideoEncodeH264SliceHeader() { 8usize, concat!("Alignment of ", stringify!(StdVideoEncodeH264SliceHeader)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).first_mb_in_slice as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(first_mb_in_slice) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_type as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(slice_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).idr_pic_id as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(idr_pic_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l0_active_minus1 - as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(num_ref_idx_l0_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l1_active_minus1 - as *const _ as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(num_ref_idx_l1_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cabac_init_idc as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(cabac_init_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).disable_deblocking_filter_idc - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(disable_deblocking_filter_idc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_alpha_c0_offset_div2 - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(slice_alpha_c0_offset_div2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_beta_offset_div2 - as *const _ as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH264SliceHeader), - "::", - stringify!(slice_beta_offset_div2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pWeightTable as *const _ - 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)] @@ -7843,58 +9086,78 @@ fn bindgen_test_layout_StdVideoEncodeH265WeightTableFlags() { stringify!(StdVideoEncodeH265WeightTableFlags) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight_l0_flag - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(luma_weight_l0_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight_l0_flag - as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(chroma_weight_l0_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight_l1_flag - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - stringify!(luma_weight_l1_flag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight_l1_flag - as *const _ as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTableFlags), - "::", - 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!(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(); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7923,148 +9186,193 @@ fn bindgen_test_layout_StdVideoEncodeH265WeightTable() { 2usize, concat!("Alignment of ", stringify!(StdVideoEncodeH265WeightTable)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_log2_weight_denom - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(luma_log2_weight_denom) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_chroma_log2_weight_denom - as *const _ as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_log2_weight_denom) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_luma_weight_l0 - as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_luma_weight_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_offset_l0 as *const _ - as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(luma_offset_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_chroma_weight_l0 - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_weight_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_chroma_offset_l0 - as *const _ as usize - }, - 70usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_offset_l0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_luma_weight_l1 - as *const _ as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_luma_weight_l1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_offset_l1 as *const _ - as usize - }, - 115usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(luma_offset_l1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_chroma_weight_l1 - as *const _ as usize - }, - 130usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_weight_l1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_chroma_offset_l1 - as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265WeightTable), - "::", - stringify!(delta_chroma_offset_l1) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -8376,253 +9684,348 @@ fn bindgen_test_layout_StdVideoEncodeH265SliceSegmentHeader() { stringify!(StdVideoEncodeH265SliceSegmentHeader) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_type as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_short_term_ref_pic_sets as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_short_term_ref_pic_sets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_segment_address - as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_segment_address) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .short_term_ref_pic_set_idx as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(short_term_ref_pic_set_idx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_long_term_sps - as *const _ as usize - }, - 17usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_long_term_sps) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_long_term_pics - as *const _ as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_long_term_pics) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).collocated_ref_idx - as *const _ as usize - }, - 19usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(collocated_ref_idx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_idx_l0_active_minus1 as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_ref_idx_l0_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .num_ref_idx_l1_active_minus1 as *const _ as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(num_ref_idx_l1_active_minus1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).MaxNumMergeCand - as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(MaxNumMergeCand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_cb_qp_offset - as *const _ as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_cb_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_cr_qp_offset - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_cr_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_beta_offset_div2 - as *const _ as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_beta_offset_div2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_tc_offset_div2 - as *const _ as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_tc_offset_div2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_act_y_qp_offset - as *const _ as usize - }, - 27usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_act_y_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_act_cb_qp_offset - as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_act_cb_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_act_cr_qp_offset - as *const _ as usize - }, - 29usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - stringify!(slice_act_cr_qp_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pWeightTable - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265SliceSegmentHeader), - "::", - 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!(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(); } #[repr(C)] #[repr(align(4))] @@ -8720,71 +10123,98 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceModifications() { stringify!(StdVideoEncodeH265ReferenceModifications) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .referenceList0ModificationsCount as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(referenceList0ModificationsCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pReferenceList0Modifications as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(pReferenceList0Modifications) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .referenceList1ModificationsCount as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(referenceList1ModificationsCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .pReferenceList1Modifications as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceModifications), - "::", - stringify!(pReferenceList1Modifications) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -8921,96 +10351,125 @@ fn bindgen_test_layout_StdVideoEncodeH265PictureInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH265PictureInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PictureType as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(PictureType) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sps_video_parameter_set_id - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(sps_video_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_seq_parameter_set_id - as *const _ as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(pps_seq_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pps_pic_parameter_set_id - as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(pps_pic_parameter_set_id) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCntVal as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).TemporalId as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265PictureInfo), - "::", - stringify!(TemporalId) - ) - ); + 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(); } #[repr(C)] #[repr(align(4))] @@ -9099,42 +10558,55 @@ fn bindgen_test_layout_StdVideoEncodeH265ReferenceInfo() { 4usize, concat!("Alignment of ", stringify!(StdVideoEncodeH265ReferenceInfo)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceInfo), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).PicOrderCntVal as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceInfo), - "::", - stringify!(PicOrderCntVal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).TemporalId as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(StdVideoEncodeH265ReferenceInfo), - "::", - stringify!(TemporalId) - ) - ); + 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(); } diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 5f271ea..79391fa 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -5,15 +5,15 @@ authors = ["Maik Klein "] edition = "2018" [dependencies] -bindgen = "0.58" -heck = "0.3" +bindgen = "0.60" +heck = "0.4" itertools = "0.10" nom = "7.1" once_cell = "1.7" proc-macro2 = "1.0" quote = "1.0" regex = "1.4" -vk-parse = { version = "0.6", features = ["vkxml-convert"] } +vk-parse = { version = "0.7", features = ["vkxml-convert"] } vkxml = "0.3" [dependencies.syn] diff --git a/generator/src/lib.rs b/generator/src/lib.rs index ac78183..7517323 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1,7 +1,7 @@ #![recursion_limit = "256"] #![warn(trivial_casts, trivial_numeric_casts)] -use heck::{CamelCase, ShoutySnakeCase, SnakeCase}; +use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase}; use itertools::Itertools; use nom::sequence::pair; use nom::{ @@ -1006,7 +1006,10 @@ pub fn generate_extension_commands<'a>( let ident = format_ident!( "{}Fn", - extension_name.to_camel_case().strip_prefix("Vk").unwrap() + extension_name + .to_upper_camel_case() + .strip_prefix("Vk") + .unwrap() ); let fp = generate_function_pointers(ident.clone(), &commands, &aliases, fn_cache);