diff --git a/ash-window/examples/winit.rs b/ash-window/examples/winit.rs index 66cbb06..9158f39 100644 --- a/ash-window/examples/winit.rs +++ b/ash-window/examples/winit.rs @@ -21,7 +21,7 @@ fn main() -> Result<(), Box> { .iter() .map(|ext| ext.as_ptr()) .collect::>(); - let app_desc = vk::ApplicationInfo::builder().api_version(vk::make_version(1, 0, 0)); + let app_desc = vk::ApplicationInfo::builder().api_version(vk::make_api_version(0, 1, 0, 0)); let instance_desc = vk::InstanceCreateInfo::builder() .application_info(&app_desc) .enabled_extension_names(&instance_extensions); diff --git a/ash/src/entry_libloading.rs b/ash/src/entry_libloading.rs index d9457b8..1ea476e 100644 --- a/ash/src/entry_libloading.rs +++ b/ash/src/entry_libloading.rs @@ -67,7 +67,7 @@ impl EntryCustom> { /// # fn main() -> Result<(), Box> { /// let entry = unsafe { Entry::new() }?; /// let app_info = vk::ApplicationInfo { - /// api_version: vk::make_version(1, 0, 0), + /// api_version: vk::make_api_version(0, 1, 0, 0), /// ..Default::default() /// }; /// let create_info = vk::InstanceCreateInfo { diff --git a/ash/src/lib.rs b/ash/src/lib.rs index 70a40a6..074fa86 100644 --- a/ash/src/lib.rs +++ b/ash/src/lib.rs @@ -14,7 +14,7 @@ //! # fn main() -> Result<(), Box> { //! let entry = unsafe { Entry::new() }?; //! let app_info = vk::ApplicationInfo { -//! api_version: vk::make_version(1, 0, 0), +//! api_version: vk::make_api_version(0, 1, 0, 0), //! ..Default::default() //! }; //! let create_info = vk::InstanceCreateInfo { diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 9308f08..ebeef53 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -24,6 +24,9 @@ mod feature_extensions; pub use feature_extensions::*; mod features; pub use features::*; +#[doc = r" Native bindings from Vulkan headers, generated by bindgen"] +#[allow(nonstandard_style)] +pub mod native; mod platform_types; pub use platform_types::*; #[doc = r" Iterates through the pointer chain. Includes the item that is passed into the function."] diff --git a/ash/src/vk/bitflags.rs b/ash/src/vk/bitflags.rs index a4fd78d..cc49296 100644 --- a/ash/src/vk/bitflags.rs +++ b/ash/src/vk/bitflags.rs @@ -1046,3 +1046,166 @@ impl SubmitFlagsKHR { pub struct EventCreateFlags(pub(crate) Flags); vk_bitflags_wrapped!(EventCreateFlags, 0b0, Flags); impl EventCreateFlags {} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoCodecOperationFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoCodecOperationFlagsKHR, 0b0, Flags); +impl VideoCodecOperationFlagsKHR { + pub const INVALID: Self = Self(0); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoChromaSubsamplingFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoChromaSubsamplingFlagsKHR, 0b1111, Flags); +impl VideoChromaSubsamplingFlagsKHR { + pub const INVALID: Self = Self(0); + pub const MONOCHROME: Self = Self(0b1); + pub const TYPE_420: Self = Self(0b10); + pub const TYPE_422: Self = Self(0b100); + pub const TYPE_444: Self = Self(0b1000); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoComponentBitDepthFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoComponentBitDepthFlagsKHR, 0b1_0101, Flags); +impl VideoComponentBitDepthFlagsKHR { + pub const INVALID: Self = Self(0); + pub const TYPE_8: Self = Self(0b1); + pub const TYPE_10: Self = Self(0b100); + pub const TYPE_12: Self = Self(0b1_0000); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoCapabilitiesFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoCapabilitiesFlagsKHR, 0b11, Flags); +impl VideoCapabilitiesFlagsKHR { + pub const PROTECTED_CONTENT: Self = Self(0b1); + pub const SEPARATE_REFERENCE_IMAGES: Self = Self(0b10); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoSessionCreateFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoSessionCreateFlagsKHR, 0b1, Flags); +impl VideoSessionCreateFlagsKHR { + pub const DEFAULT: Self = Self(0); + pub const PROTECTED_CONTENT: Self = Self(0b1); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoCodingQualityPresetFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoCodingQualityPresetFlagsKHR, 0b111, Flags); +impl VideoCodingQualityPresetFlagsKHR { + pub const DEFAULT: Self = Self(0); + pub const NORMAL: Self = Self(0b1); + pub const POWER: Self = Self(0b10); + pub const QUALITY: Self = Self(0b100); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoDecodeH264FieldLayoutFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoDecodeH264FieldLayoutFlagsEXT, 0b11, Flags); +impl VideoDecodeH264FieldLayoutFlagsEXT { + pub const PROGRESSIVE_PICTURES_ONLY: Self = Self(0); + pub const LINE_INTERLACED_PLANE: Self = Self(0b1); + pub const SEPARATE_INTERLACED_PLANE: Self = Self(0b10); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoCodingControlFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoCodingControlFlagsKHR, 0b1, Flags); +impl VideoCodingControlFlagsKHR { + pub const DEFAULT: Self = Self(0); + pub const RESET: Self = Self(0b1); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoDecodeFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoDecodeFlagsKHR, 0b1, Flags); +impl VideoDecodeFlagsKHR { + pub const DEFAULT: Self = Self(0); + pub const RESERVED_0: Self = Self(0b1); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeFlagsKHR, 0b1, Flags); +impl VideoEncodeFlagsKHR { + pub const DEFAULT: Self = Self(0); + pub const RESERVED_0: Self = Self(0b1); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeRateControlFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeRateControlFlagsKHR, 0b1, Flags); +impl VideoEncodeRateControlFlagsKHR { + pub const DEFAULT: Self = Self(0); + pub const RESET: Self = Self(0b1); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeRateControlModeFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeRateControlModeFlagsKHR, 0b11, Flags); +impl VideoEncodeRateControlModeFlagsKHR { + pub const NONE: Self = Self(0); + pub const CBR: Self = Self(1); + pub const VBR: Self = Self(2); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeH264CapabilitiesFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeH264CapabilitiesFlagsEXT, 0b111_1111_1111, Flags); +impl VideoEncodeH264CapabilitiesFlagsEXT { + pub const CABAC: Self = Self(0b1); + pub const CAVLC: Self = Self(0b10); + pub const WEIGHTED_BI_PRED_IMPLICIT: Self = Self(0b100); + pub const TRANSFORM_8X8: Self = Self(0b1000); + pub const CHROMA_QP_OFFSET: Self = Self(0b1_0000); + pub const SECOND_CHROMA_QP_OFFSET: Self = Self(0b10_0000); + pub const DEBLOCKING_FILTER_DISABLED: Self = Self(0b100_0000); + pub const DEBLOCKING_FILTER_ENABLED: Self = Self(0b1000_0000); + pub const DEBLOCKING_FILTER_PARTIAL: Self = Self(0b1_0000_0000); + pub const MULTIPLE_SLICE_PER_FRAME: Self = Self(0b10_0000_0000); + pub const EVENLY_DISTRIBUTED_SLICE_SIZE: Self = Self(0b100_0000_0000); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeH264InputModeFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeH264InputModeFlagsEXT, 0b111, Flags); +impl VideoEncodeH264InputModeFlagsEXT { + pub const FRAME: Self = Self(0b1); + pub const SLICE: Self = Self(0b10); + pub const NON_VCL: Self = Self(0b100); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeH264OutputModeFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeH264OutputModeFlagsEXT, 0b111, Flags); +impl VideoEncodeH264OutputModeFlagsEXT { + pub const FRAME: Self = Self(0b1); + pub const SLICE: Self = Self(0b10); + pub const NON_VCL: Self = Self(0b100); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEncodeH264CreateFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEncodeH264CreateFlagsEXT, 0b1, Flags); +impl VideoEncodeH264CreateFlagsEXT { + pub const DEFAULT: Self = Self(0); + pub const RESERVED_0: Self = Self(0b1); +} diff --git a/ash/src/vk/const_debugs.rs b/ash/src/vk/const_debugs.rs index 81be1f8..0e55202 100644 --- a/ash/src/vk/const_debugs.rs +++ b/ash/src/vk/const_debugs.rs @@ -246,10 +246,10 @@ impl fmt::Debug for AccessFlags2KHR { AccessFlags2KHR::SHADER_STORAGE_WRITE.0, "SHADER_STORAGE_WRITE", ), - (AccessFlags2KHR::RESERVED_READ_35.0, "RESERVED_READ_35"), - (AccessFlags2KHR::RESERVED_WRITE_36.0, "RESERVED_WRITE_36"), - (AccessFlags2KHR::RESERVED_READ_37.0, "RESERVED_READ_37"), - (AccessFlags2KHR::RESERVED_WRITE_38.0, "RESERVED_WRITE_38"), + (AccessFlags2KHR::VIDEO_DECODE_READ.0, "VIDEO_DECODE_READ"), + (AccessFlags2KHR::VIDEO_DECODE_WRITE.0, "VIDEO_DECODE_WRITE"), + (AccessFlags2KHR::VIDEO_ENCODE_READ.0, "VIDEO_ENCODE_READ"), + (AccessFlags2KHR::VIDEO_ENCODE_WRITE.0, "VIDEO_ENCODE_WRITE"), ( AccessFlags2KHR::TRANSFORM_FEEDBACK_WRITE_EXT.0, "TRANSFORM_FEEDBACK_WRITE_EXT", @@ -509,10 +509,22 @@ impl fmt::Debug for BufferUsageFlags { (BufferUsageFlags::INDEX_BUFFER.0, "INDEX_BUFFER"), (BufferUsageFlags::VERTEX_BUFFER.0, "VERTEX_BUFFER"), (BufferUsageFlags::INDIRECT_BUFFER.0, "INDIRECT_BUFFER"), - (BufferUsageFlags::RESERVED_15_KHR.0, "RESERVED_15_KHR"), - (BufferUsageFlags::RESERVED_16_KHR.0, "RESERVED_16_KHR"), - (BufferUsageFlags::RESERVED_13_KHR.0, "RESERVED_13_KHR"), - (BufferUsageFlags::RESERVED_14_KHR.0, "RESERVED_14_KHR"), + ( + BufferUsageFlags::VIDEO_DECODE_SRC_KHR.0, + "VIDEO_DECODE_SRC_KHR", + ), + ( + BufferUsageFlags::VIDEO_DECODE_DST_KHR.0, + "VIDEO_DECODE_DST_KHR", + ), + ( + BufferUsageFlags::VIDEO_ENCODE_DST_KHR.0, + "VIDEO_ENCODE_DST_KHR", + ), + ( + BufferUsageFlags::VIDEO_ENCODE_SRC_KHR.0, + "VIDEO_ENCODE_SRC_KHR", + ), ( BufferUsageFlags::TRANSFORM_FEEDBACK_BUFFER_EXT.0, "TRANSFORM_FEEDBACK_BUFFER_EXT", @@ -1277,6 +1289,7 @@ impl fmt::Debug for DriverId { Self::BROADCOM_PROPRIETARY => Some("BROADCOM_PROPRIETARY"), Self::MESA_LLVMPIPE => Some("MESA_LLVMPIPE"), Self::MOLTENVK => Some("MOLTENVK"), + Self::COREAVI_PROPRIETARY => Some("COREAVI_PROPRIETARY"), _ => None, }; if let Some(x) = name { @@ -1321,6 +1334,8 @@ impl fmt::Debug for DynamicState { Self::DEPTH_BOUNDS_TEST_ENABLE_EXT => Some("DEPTH_BOUNDS_TEST_ENABLE_EXT"), Self::STENCIL_TEST_ENABLE_EXT => Some("STENCIL_TEST_ENABLE_EXT"), Self::STENCIL_OP_EXT => Some("STENCIL_OP_EXT"), + Self::VERTEX_INPUT_EXT => Some("VERTEX_INPUT_EXT"), + Self::COLOR_WRITE_ENABLE_EXT => Some("COLOR_WRITE_ENABLE_EXT"), _ => None, }; if let Some(x) = name { @@ -1771,6 +1786,14 @@ impl fmt::Debug for Format { Self::ASTC_6X6X6_UNORM_BLOCK_EXT => Some("ASTC_6X6X6_UNORM_BLOCK_EXT"), Self::ASTC_6X6X6_SRGB_BLOCK_EXT => Some("ASTC_6X6X6_SRGB_BLOCK_EXT"), Self::ASTC_6X6X6_SFLOAT_BLOCK_EXT => Some("ASTC_6X6X6_SFLOAT_BLOCK_EXT"), + Self::G8_B8R8_2PLANE_444_UNORM_EXT => Some("G8_B8R8_2PLANE_444_UNORM_EXT"), + Self::G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT => { + Some("G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT") + } + Self::G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT => { + Some("G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT") + } + Self::G16_B16R16_2PLANE_444_UNORM_EXT => Some("G16_B16R16_2PLANE_444_UNORM_EXT"), Self::A4R4G4B4_UNORM_PACK16_EXT => Some("A4R4G4B4_UNORM_PACK16_EXT"), Self::A4B4G4R4_UNORM_PACK16_EXT => Some("A4B4G4R4_UNORM_PACK16_EXT"), Self::G8B8G8R8_422_UNORM => Some("G8B8G8R8_422_UNORM"), @@ -1846,7 +1869,7 @@ impl fmt::Debug for Format { } impl fmt::Debug for FormatFeatureFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN : & [(Flags , & str)] = & [(FormatFeatureFlags :: SAMPLED_IMAGE . 0 , "SAMPLED_IMAGE") , (FormatFeatureFlags :: STORAGE_IMAGE . 0 , "STORAGE_IMAGE") , (FormatFeatureFlags :: STORAGE_IMAGE_ATOMIC . 0 , "STORAGE_IMAGE_ATOMIC") , (FormatFeatureFlags :: UNIFORM_TEXEL_BUFFER . 0 , "UNIFORM_TEXEL_BUFFER") , (FormatFeatureFlags :: STORAGE_TEXEL_BUFFER . 0 , "STORAGE_TEXEL_BUFFER") , (FormatFeatureFlags :: STORAGE_TEXEL_BUFFER_ATOMIC . 0 , "STORAGE_TEXEL_BUFFER_ATOMIC") , (FormatFeatureFlags :: VERTEX_BUFFER . 0 , "VERTEX_BUFFER") , (FormatFeatureFlags :: COLOR_ATTACHMENT . 0 , "COLOR_ATTACHMENT") , (FormatFeatureFlags :: COLOR_ATTACHMENT_BLEND . 0 , "COLOR_ATTACHMENT_BLEND") , (FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT . 0 , "DEPTH_STENCIL_ATTACHMENT") , (FormatFeatureFlags :: BLIT_SRC . 0 , "BLIT_SRC") , (FormatFeatureFlags :: BLIT_DST . 0 , "BLIT_DST") , (FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_LINEAR . 0 , "SAMPLED_IMAGE_FILTER_LINEAR") , (FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_CUBIC_IMG . 0 , "SAMPLED_IMAGE_FILTER_CUBIC_IMG") , (FormatFeatureFlags :: RESERVED_27_KHR . 0 , "RESERVED_27_KHR") , (FormatFeatureFlags :: RESERVED_28_KHR . 0 , "RESERVED_28_KHR") , (FormatFeatureFlags :: RESERVED_25_KHR . 0 , "RESERVED_25_KHR") , (FormatFeatureFlags :: RESERVED_26_KHR . 0 , "RESERVED_26_KHR") , (FormatFeatureFlags :: ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR . 0 , "ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR") , (FormatFeatureFlags :: FRAGMENT_DENSITY_MAP_EXT . 0 , "FRAGMENT_DENSITY_MAP_EXT") , (FormatFeatureFlags :: FRAGMENT_SHADING_RATE_ATTACHMENT_KHR . 0 , "FRAGMENT_SHADING_RATE_ATTACHMENT_KHR") , (FormatFeatureFlags :: TRANSFER_SRC . 0 , "TRANSFER_SRC") , (FormatFeatureFlags :: TRANSFER_DST . 0 , "TRANSFER_DST") , (FormatFeatureFlags :: MIDPOINT_CHROMA_SAMPLES . 0 , "MIDPOINT_CHROMA_SAMPLES") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE") , (FormatFeatureFlags :: DISJOINT . 0 , "DISJOINT") , (FormatFeatureFlags :: COSITED_CHROMA_SAMPLES . 0 , "COSITED_CHROMA_SAMPLES") , (FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_MINMAX . 0 , "SAMPLED_IMAGE_FILTER_MINMAX")] ; + const KNOWN : & [(Flags , & str)] = & [(FormatFeatureFlags :: SAMPLED_IMAGE . 0 , "SAMPLED_IMAGE") , (FormatFeatureFlags :: STORAGE_IMAGE . 0 , "STORAGE_IMAGE") , (FormatFeatureFlags :: STORAGE_IMAGE_ATOMIC . 0 , "STORAGE_IMAGE_ATOMIC") , (FormatFeatureFlags :: UNIFORM_TEXEL_BUFFER . 0 , "UNIFORM_TEXEL_BUFFER") , (FormatFeatureFlags :: STORAGE_TEXEL_BUFFER . 0 , "STORAGE_TEXEL_BUFFER") , (FormatFeatureFlags :: STORAGE_TEXEL_BUFFER_ATOMIC . 0 , "STORAGE_TEXEL_BUFFER_ATOMIC") , (FormatFeatureFlags :: VERTEX_BUFFER . 0 , "VERTEX_BUFFER") , (FormatFeatureFlags :: COLOR_ATTACHMENT . 0 , "COLOR_ATTACHMENT") , (FormatFeatureFlags :: COLOR_ATTACHMENT_BLEND . 0 , "COLOR_ATTACHMENT_BLEND") , (FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT . 0 , "DEPTH_STENCIL_ATTACHMENT") , (FormatFeatureFlags :: BLIT_SRC . 0 , "BLIT_SRC") , (FormatFeatureFlags :: BLIT_DST . 0 , "BLIT_DST") , (FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_LINEAR . 0 , "SAMPLED_IMAGE_FILTER_LINEAR") , (FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_CUBIC_IMG . 0 , "SAMPLED_IMAGE_FILTER_CUBIC_IMG") , (FormatFeatureFlags :: VIDEO_DECODE_OUTPUT_KHR . 0 , "VIDEO_DECODE_OUTPUT_KHR") , (FormatFeatureFlags :: VIDEO_DECODE_DPB_KHR . 0 , "VIDEO_DECODE_DPB_KHR") , (FormatFeatureFlags :: VIDEO_ENCODE_INPUT_KHR . 0 , "VIDEO_ENCODE_INPUT_KHR") , (FormatFeatureFlags :: VIDEO_ENCODE_DPB_KHR . 0 , "VIDEO_ENCODE_DPB_KHR") , (FormatFeatureFlags :: ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR . 0 , "ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR") , (FormatFeatureFlags :: FRAGMENT_DENSITY_MAP_EXT . 0 , "FRAGMENT_DENSITY_MAP_EXT") , (FormatFeatureFlags :: FRAGMENT_SHADING_RATE_ATTACHMENT_KHR . 0 , "FRAGMENT_SHADING_RATE_ATTACHMENT_KHR") , (FormatFeatureFlags :: TRANSFER_SRC . 0 , "TRANSFER_SRC") , (FormatFeatureFlags :: TRANSFER_DST . 0 , "TRANSFER_DST") , (FormatFeatureFlags :: MIDPOINT_CHROMA_SAMPLES . 0 , "MIDPOINT_CHROMA_SAMPLES") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT") , (FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE") , (FormatFeatureFlags :: DISJOINT . 0 , "DISJOINT") , (FormatFeatureFlags :: COSITED_CHROMA_SAMPLES . 0 , "COSITED_CHROMA_SAMPLES") , (FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_MINMAX . 0 , "SAMPLED_IMAGE_FILTER_MINMAX")] ; debug_flags(f, KNOWN, self.0) } } @@ -2066,6 +2089,12 @@ impl fmt::Debug for ImageLayout { Self::TRANSFER_DST_OPTIMAL => Some("TRANSFER_DST_OPTIMAL"), Self::PREINITIALIZED => Some("PREINITIALIZED"), Self::PRESENT_SRC_KHR => Some("PRESENT_SRC_KHR"), + Self::VIDEO_DECODE_DST_KHR => Some("VIDEO_DECODE_DST_KHR"), + Self::VIDEO_DECODE_SRC_KHR => Some("VIDEO_DECODE_SRC_KHR"), + Self::VIDEO_DECODE_DPB_KHR => Some("VIDEO_DECODE_DPB_KHR"), + Self::VIDEO_ENCODE_DST_KHR => Some("VIDEO_ENCODE_DST_KHR"), + Self::VIDEO_ENCODE_SRC_KHR => Some("VIDEO_ENCODE_SRC_KHR"), + Self::VIDEO_ENCODE_DPB_KHR => Some("VIDEO_ENCODE_DPB_KHR"), Self::SHARED_PRESENT_KHR => Some("SHARED_PRESENT_KHR"), Self::SHADING_RATE_OPTIMAL_NV => Some("SHADING_RATE_OPTIMAL_NV"), Self::FRAGMENT_DENSITY_MAP_OPTIMAL_EXT => Some("FRAGMENT_DENSITY_MAP_OPTIMAL_EXT"), @@ -2143,12 +2172,30 @@ impl fmt::Debug for ImageUsageFlags { "TRANSIENT_ATTACHMENT", ), (ImageUsageFlags::INPUT_ATTACHMENT.0, "INPUT_ATTACHMENT"), - (ImageUsageFlags::RESERVED_13_KHR.0, "RESERVED_13_KHR"), - (ImageUsageFlags::RESERVED_14_KHR.0, "RESERVED_14_KHR"), - (ImageUsageFlags::RESERVED_15_KHR.0, "RESERVED_15_KHR"), - (ImageUsageFlags::RESERVED_10_KHR.0, "RESERVED_10_KHR"), - (ImageUsageFlags::RESERVED_11_KHR.0, "RESERVED_11_KHR"), - (ImageUsageFlags::RESERVED_12_KHR.0, "RESERVED_12_KHR"), + ( + ImageUsageFlags::VIDEO_DECODE_DST_KHR.0, + "VIDEO_DECODE_DST_KHR", + ), + ( + ImageUsageFlags::VIDEO_DECODE_SRC_KHR.0, + "VIDEO_DECODE_SRC_KHR", + ), + ( + ImageUsageFlags::VIDEO_DECODE_DPB_KHR.0, + "VIDEO_DECODE_DPB_KHR", + ), + ( + ImageUsageFlags::VIDEO_ENCODE_DST_KHR.0, + "VIDEO_ENCODE_DST_KHR", + ), + ( + ImageUsageFlags::VIDEO_ENCODE_SRC_KHR.0, + "VIDEO_ENCODE_SRC_KHR", + ), + ( + ImageUsageFlags::VIDEO_ENCODE_DPB_KHR.0, + "VIDEO_ENCODE_DPB_KHR", + ), ( ImageUsageFlags::SHADING_RATE_IMAGE_NV.0, "SHADING_RATE_IMAGE_NV", @@ -2433,6 +2480,8 @@ impl fmt::Debug for ObjectType { Self::DISPLAY_KHR => Some("DISPLAY_KHR"), Self::DISPLAY_MODE_KHR => Some("DISPLAY_MODE_KHR"), Self::DEBUG_REPORT_CALLBACK_EXT => Some("DEBUG_REPORT_CALLBACK_EXT"), + Self::VIDEO_SESSION_KHR => Some("VIDEO_SESSION_KHR"), + Self::VIDEO_SESSION_PARAMETERS_KHR => Some("VIDEO_SESSION_PARAMETERS_KHR"), Self::DEBUG_UTILS_MESSENGER_EXT => Some("DEBUG_UTILS_MESSENGER_EXT"), Self::ACCELERATION_STRUCTURE_KHR => Some("ACCELERATION_STRUCTURE_KHR"), Self::VALIDATION_CACHE_EXT => Some("VALIDATION_CACHE_EXT"), @@ -2988,8 +3037,8 @@ impl fmt::Debug for PipelineStageFlags2KHR { PipelineStageFlags2KHR::PRE_RASTERIZATION_SHADERS.0, "PRE_RASTERIZATION_SHADERS", ), - (PipelineStageFlags2KHR::RESERVED_26.0, "RESERVED_26"), - (PipelineStageFlags2KHR::RESERVED_27.0, "RESERVED_27"), + (PipelineStageFlags2KHR::VIDEO_DECODE.0, "VIDEO_DECODE"), + (PipelineStageFlags2KHR::VIDEO_ENCODE.0, "VIDEO_ENCODE"), ( PipelineStageFlags2KHR::TRANSFORM_FEEDBACK_EXT.0, "TRANSFORM_FEEDBACK_EXT", @@ -3208,18 +3257,36 @@ impl fmt::Debug for QueryResultFlags { (QueryResultFlags::WAIT.0, "WAIT"), (QueryResultFlags::WITH_AVAILABILITY.0, "WITH_AVAILABILITY"), (QueryResultFlags::PARTIAL.0, "PARTIAL"), + (QueryResultFlags::WITH_STATUS_KHR.0, "WITH_STATUS_KHR"), ]; debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for QueryResultStatusKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::ERROR => Some("ERROR"), + Self::NOT_READY => Some("NOT_READY"), + Self::COMPLETE => Some("COMPLETE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + self.0.fmt(f) + } + } +} impl fmt::Debug for QueryType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { Self::OCCLUSION => Some("OCCLUSION"), Self::PIPELINE_STATISTICS => Some("PIPELINE_STATISTICS"), Self::TIMESTAMP => Some("TIMESTAMP"), - Self::RESERVED_8 => Some("RESERVED_8"), - Self::RESERVED_4 => Some("RESERVED_4"), + Self::RESULT_STATUS_ONLY_KHR => Some("RESULT_STATUS_ONLY_KHR"), + Self::VIDEO_ENCODESTREAM_BUFFER_RANGE_KHR => { + Some("VIDEO_ENCODESTREAM_BUFFER_RANGE_KHR") + } Self::TRANSFORM_FEEDBACK_STREAM_EXT => Some("TRANSFORM_FEEDBACK_STREAM_EXT"), Self::PERFORMANCE_QUERY_KHR => Some("PERFORMANCE_QUERY_KHR"), Self::ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR => { @@ -3248,8 +3315,8 @@ impl fmt::Debug for QueueFlags { (QueueFlags::COMPUTE.0, "COMPUTE"), (QueueFlags::TRANSFER.0, "TRANSFER"), (QueueFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), - (QueueFlags::RESERVED_6_KHR.0, "RESERVED_6_KHR"), - (QueueFlags::RESERVED_5_KHR.0, "RESERVED_5_KHR"), + (QueueFlags::VIDEO_DECODE_KHR.0, "VIDEO_DECODE_KHR"), + (QueueFlags::VIDEO_ENCODE_KHR.0, "VIDEO_ENCODE_KHR"), (QueueFlags::PROTECTED.0, "PROTECTED"), ]; debug_flags(f, KNOWN, self.0) @@ -3824,6 +3891,33 @@ impl fmt::Debug for StructureType { Self::DEBUG_MARKER_OBJECT_NAME_INFO_EXT => Some("DEBUG_MARKER_OBJECT_NAME_INFO_EXT"), Self::DEBUG_MARKER_OBJECT_TAG_INFO_EXT => Some("DEBUG_MARKER_OBJECT_TAG_INFO_EXT"), Self::DEBUG_MARKER_MARKER_INFO_EXT => Some("DEBUG_MARKER_MARKER_INFO_EXT"), + Self::VIDEO_PROFILE_KHR => Some("VIDEO_PROFILE_KHR"), + Self::VIDEO_CAPABILITIES_KHR => Some("VIDEO_CAPABILITIES_KHR"), + Self::VIDEO_PICTURE_RESOURCE_KHR => Some("VIDEO_PICTURE_RESOURCE_KHR"), + Self::VIDEO_GET_MEMORY_PROPERTIES_KHR => Some("VIDEO_GET_MEMORY_PROPERTIES_KHR"), + Self::VIDEO_BIND_MEMORY_KHR => Some("VIDEO_BIND_MEMORY_KHR"), + Self::VIDEO_SESSION_CREATE_INFO_KHR => Some("VIDEO_SESSION_CREATE_INFO_KHR"), + Self::VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR => { + Some("VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR") + } + Self::VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR => { + Some("VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR") + } + Self::VIDEO_BEGIN_CODING_INFO_KHR => Some("VIDEO_BEGIN_CODING_INFO_KHR"), + Self::VIDEO_END_CODING_INFO_KHR => Some("VIDEO_END_CODING_INFO_KHR"), + Self::VIDEO_CODING_CONTROL_INFO_KHR => Some("VIDEO_CODING_CONTROL_INFO_KHR"), + Self::VIDEO_REFERENCE_SLOT_KHR => Some("VIDEO_REFERENCE_SLOT_KHR"), + Self::VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR => { + Some("VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR") + } + Self::VIDEO_PROFILES_KHR => Some("VIDEO_PROFILES_KHR"), + Self::PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR => { + Some("PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR") + } + Self::VIDEO_FORMAT_PROPERTIES_KHR => Some("VIDEO_FORMAT_PROPERTIES_KHR"), + Self::VIDEO_DECODE_INFO_KHR => Some("VIDEO_DECODE_INFO_KHR"), + Self::VIDEO_ENCODE_INFO_KHR => Some("VIDEO_ENCODE_INFO_KHR"), + Self::VIDEO_ENCODE_RATE_CONTROL_INFO_KHR => Some("VIDEO_ENCODE_RATE_CONTROL_INFO_KHR"), Self::DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV => { Some("DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV") } @@ -3844,6 +3938,43 @@ impl fmt::Debug for StructureType { } Self::IMAGE_VIEW_HANDLE_INFO_NVX => Some("IMAGE_VIEW_HANDLE_INFO_NVX"), Self::IMAGE_VIEW_ADDRESS_PROPERTIES_NVX => Some("IMAGE_VIEW_ADDRESS_PROPERTIES_NVX"), + Self::VIDEO_ENCODE_H264_CAPABILITIES_EXT => Some("VIDEO_ENCODE_H264_CAPABILITIES_EXT"), + Self::VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT => { + Some("VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT") + } + Self::VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT => { + Some("VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT") + } + Self::VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT => { + Some("VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT") + } + Self::VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT => { + Some("VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT") + } + Self::VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT => { + Some("VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT") + } + Self::VIDEO_ENCODE_H264_NALU_SLICE_EXT => Some("VIDEO_ENCODE_H264_NALU_SLICE_EXT"), + Self::VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT => { + Some("VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT") + } + Self::VIDEO_ENCODE_H264_PROFILE_EXT => Some("VIDEO_ENCODE_H264_PROFILE_EXT"), + Self::VIDEO_DECODE_H264_CAPABILITIES_EXT => Some("VIDEO_DECODE_H264_CAPABILITIES_EXT"), + Self::VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT => { + Some("VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT") + } + Self::VIDEO_DECODE_H264_PICTURE_INFO_EXT => Some("VIDEO_DECODE_H264_PICTURE_INFO_EXT"), + Self::VIDEO_DECODE_H264_MVC_EXT => Some("VIDEO_DECODE_H264_MVC_EXT"), + Self::VIDEO_DECODE_H264_PROFILE_EXT => Some("VIDEO_DECODE_H264_PROFILE_EXT"), + Self::VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT => { + Some("VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT") + } + Self::VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT => { + Some("VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT") + } + Self::VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT => { + Some("VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT") + } Self::TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD => { Some("TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD") } @@ -4203,6 +4334,21 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD => { Some("PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD") } + Self::VIDEO_DECODE_H265_CAPABILITIES_EXT => Some("VIDEO_DECODE_H265_CAPABILITIES_EXT"), + Self::VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT => { + Some("VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT") + } + Self::VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT => { + Some("VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT") + } + Self::VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT => { + Some("VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT") + } + Self::VIDEO_DECODE_H265_PROFILE_EXT => Some("VIDEO_DECODE_H265_PROFILE_EXT"), + Self::VIDEO_DECODE_H265_PICTURE_INFO_EXT => Some("VIDEO_DECODE_H265_PICTURE_INFO_EXT"), + Self::VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT => { + Some("VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT") + } Self::DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD => { Some("DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD") } @@ -4423,6 +4569,12 @@ impl fmt::Debug for StructureType { Self::PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV => { Some("PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV") } + Self::PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV => { + Some("PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV") + } + Self::COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV => { + Some("COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV") + } Self::PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT => { Some("PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT") } @@ -4503,6 +4655,9 @@ impl fmt::Debug for StructureType { Self::PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV => { Some("PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV") } + Self::PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT") + } Self::PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT => { Some("PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT") } @@ -4537,6 +4692,15 @@ impl fmt::Debug for StructureType { Self::MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE => { Some("MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE") } + Self::PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT") + } + Self::VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT => { + Some("VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT") + } + Self::VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT => { + Some("VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT") + } Self::IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA => { Some("IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA") } @@ -4553,6 +4717,12 @@ impl fmt::Debug for StructureType { Some("SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA") } Self::SCREEN_SURFACE_CREATE_INFO_QNX => Some("SCREEN_SURFACE_CREATE_INFO_QNX"), + Self::PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT") + } + Self::PIPELINE_COLOR_WRITE_CREATE_INFO_EXT => { + Some("PIPELINE_COLOR_WRITE_CREATE_INFO_EXT") + } Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => { Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES") } @@ -5083,6 +5253,250 @@ impl fmt::Debug for ViSurfaceCreateFlagsNN { debug_flags(f, KNOWN, self.0) } } +impl fmt::Debug for VideoBeginCodingFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoCapabilitiesFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + VideoCapabilitiesFlagsKHR::PROTECTED_CONTENT.0, + "PROTECTED_CONTENT", + ), + ( + VideoCapabilitiesFlagsKHR::SEPARATE_REFERENCE_IMAGES.0, + "SEPARATE_REFERENCE_IMAGES", + ), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoChromaSubsamplingFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoChromaSubsamplingFlagsKHR::INVALID.0, "INVALID"), + (VideoChromaSubsamplingFlagsKHR::MONOCHROME.0, "MONOCHROME"), + (VideoChromaSubsamplingFlagsKHR::TYPE_420.0, "TYPE_420"), + (VideoChromaSubsamplingFlagsKHR::TYPE_422.0, "TYPE_422"), + (VideoChromaSubsamplingFlagsKHR::TYPE_444.0, "TYPE_444"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoCodecOperationFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoCodecOperationFlagsKHR::INVALID.0, "INVALID"), + ( + VideoCodecOperationFlagsKHR::ENCODE_H264_EXT.0, + "ENCODE_H264_EXT", + ), + ( + VideoCodecOperationFlagsKHR::DECODE_H264_EXT.0, + "DECODE_H264_EXT", + ), + ( + VideoCodecOperationFlagsKHR::DECODE_H265_EXT.0, + "DECODE_H265_EXT", + ), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoCodingControlFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoCodingControlFlagsKHR::DEFAULT.0, "DEFAULT"), + (VideoCodingControlFlagsKHR::RESET.0, "RESET"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoCodingQualityPresetFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoCodingQualityPresetFlagsKHR::DEFAULT.0, "DEFAULT"), + (VideoCodingQualityPresetFlagsKHR::NORMAL.0, "NORMAL"), + (VideoCodingQualityPresetFlagsKHR::POWER.0, "POWER"), + (VideoCodingQualityPresetFlagsKHR::QUALITY.0, "QUALITY"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoComponentBitDepthFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoComponentBitDepthFlagsKHR::INVALID.0, "INVALID"), + (VideoComponentBitDepthFlagsKHR::TYPE_8.0, "TYPE_8"), + (VideoComponentBitDepthFlagsKHR::TYPE_10.0, "TYPE_10"), + (VideoComponentBitDepthFlagsKHR::TYPE_12.0, "TYPE_12"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoDecodeFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoDecodeFlagsKHR::DEFAULT.0, "DEFAULT"), + (VideoDecodeFlagsKHR::RESERVED_0.0, "RESERVED_0"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoDecodeH264CreateFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoDecodeH264FieldLayoutFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + VideoDecodeH264FieldLayoutFlagsEXT::PROGRESSIVE_PICTURES_ONLY.0, + "PROGRESSIVE_PICTURES_ONLY", + ), + ( + VideoDecodeH264FieldLayoutFlagsEXT::LINE_INTERLACED_PLANE.0, + "LINE_INTERLACED_PLANE", + ), + ( + VideoDecodeH264FieldLayoutFlagsEXT::SEPARATE_INTERLACED_PLANE.0, + "SEPARATE_INTERLACED_PLANE", + ), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoDecodeH265CreateFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeFlagsKHR::DEFAULT.0, "DEFAULT"), + (VideoEncodeFlagsKHR::RESERVED_0.0, "RESERVED_0"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeH264CapabilitiesFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeH264CapabilitiesFlagsEXT::CABAC.0, "CABAC"), + (VideoEncodeH264CapabilitiesFlagsEXT::CAVLC.0, "CAVLC"), + ( + VideoEncodeH264CapabilitiesFlagsEXT::WEIGHTED_BI_PRED_IMPLICIT.0, + "WEIGHTED_BI_PRED_IMPLICIT", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::TRANSFORM_8X8.0, + "TRANSFORM_8X8", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::CHROMA_QP_OFFSET.0, + "CHROMA_QP_OFFSET", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::SECOND_CHROMA_QP_OFFSET.0, + "SECOND_CHROMA_QP_OFFSET", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::DEBLOCKING_FILTER_DISABLED.0, + "DEBLOCKING_FILTER_DISABLED", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::DEBLOCKING_FILTER_ENABLED.0, + "DEBLOCKING_FILTER_ENABLED", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::DEBLOCKING_FILTER_PARTIAL.0, + "DEBLOCKING_FILTER_PARTIAL", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::MULTIPLE_SLICE_PER_FRAME.0, + "MULTIPLE_SLICE_PER_FRAME", + ), + ( + VideoEncodeH264CapabilitiesFlagsEXT::EVENLY_DISTRIBUTED_SLICE_SIZE.0, + "EVENLY_DISTRIBUTED_SLICE_SIZE", + ), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeH264CreateFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeH264CreateFlagsEXT::DEFAULT.0, "DEFAULT"), + (VideoEncodeH264CreateFlagsEXT::RESERVED_0.0, "RESERVED_0"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeH264InputModeFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeH264InputModeFlagsEXT::FRAME.0, "FRAME"), + (VideoEncodeH264InputModeFlagsEXT::SLICE.0, "SLICE"), + (VideoEncodeH264InputModeFlagsEXT::NON_VCL.0, "NON_VCL"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeH264OutputModeFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeH264OutputModeFlagsEXT::FRAME.0, "FRAME"), + (VideoEncodeH264OutputModeFlagsEXT::SLICE.0, "SLICE"), + (VideoEncodeH264OutputModeFlagsEXT::NON_VCL.0, "NON_VCL"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeRateControlFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeRateControlFlagsKHR::DEFAULT.0, "DEFAULT"), + (VideoEncodeRateControlFlagsKHR::RESET.0, "RESET"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEncodeRateControlModeFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoEncodeRateControlModeFlagsKHR::NONE.0, "NONE"), + (VideoEncodeRateControlModeFlagsKHR::CBR.0, "CBR"), + (VideoEncodeRateControlModeFlagsKHR::VBR.0, "VBR"), + ]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoEndCodingFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[]; + debug_flags(f, KNOWN, self.0) + } +} +impl fmt::Debug for VideoSessionCreateFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (VideoSessionCreateFlagsKHR::DEFAULT.0, "DEFAULT"), + ( + VideoSessionCreateFlagsKHR::PROTECTED_CONTENT.0, + "PROTECTED_CONTENT", + ), + ]; + debug_flags(f, KNOWN, self.0) + } +} impl fmt::Debug for ViewportCoordinateSwizzleNV { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index c0d75ac..521863c 100644 --- a/ash/src/vk/definitions.rs +++ b/ash/src/vk/definitions.rs @@ -2,35 +2,60 @@ use crate::vk::aliases::*; use crate::vk::bitflags::*; use crate::vk::constants::*; use crate::vk::enums::*; +use crate::vk::native::*; use crate::vk::platform_types::*; use crate::vk::{ptr_chain_iter, Handle}; use std::fmt; use std::os::raw::*; +#[deprecated = "This define is deprecated. VK_MAKE_API_VERSION should be used instead."] #[doc = ""] pub const fn make_version(major: u32, minor: u32, patch: u32) -> u32 { ((major) << 22) | ((minor) << 12) | (patch) } +#[deprecated = "This define is deprecated. VK_API_VERSION_MAJOR should be used instead."] #[doc = ""] pub const fn version_major(version: u32) -> u32 { (version) >> 22 } +#[deprecated = "This define is deprecated. VK_API_VERSION_MINOR should be used instead."] #[doc = ""] pub const fn version_minor(version: u32) -> u32 { ((version) >> 12) & 0x3ffu32 } +#[deprecated = "This define is deprecated. VK_API_VERSION_PATCH should be used instead."] #[doc = ""] pub const fn version_patch(version: u32) -> u32 { (version) & 0xfffu32 } +#[doc = ""] +pub const fn make_api_version(variant: u32, major: u32, minor: u32, patch: u32) -> u32 { + ((variant) << 29) | ((major) << 22) | ((minor) << 12) | (patch) +} +#[doc = ""] +pub const fn api_version_variant(version: u32) -> u32 { + (version) >> 29 +} +#[doc = ""] +pub const fn api_version_major(version: u32) -> u32 { + ((version) >> 22) & 0x7fu32 +} +#[doc = ""] +pub const fn api_version_minor(version: u32) -> u32 { + ((version) >> 12) & 0x3ffu32 +} +#[doc = ""] +pub const fn api_version_patch(version: u32) -> u32 { + (version) & 0xfffu32 +} #[doc = ""] -pub const API_VERSION_1_0: u32 = make_version(1, 0, 0); +pub const API_VERSION_1_0: u32 = make_api_version(0, 1, 0, 0); #[doc = ""] -pub const API_VERSION_1_1: u32 = make_version(1, 1, 0); +pub const API_VERSION_1_1: u32 = make_api_version(0, 1, 1, 0); #[doc = ""] -pub const API_VERSION_1_2: u32 = make_version(1, 2, 0); -pub const HEADER_VERSION: u32 = 174u32; +pub const API_VERSION_1_2: u32 = make_api_version(0, 1, 2, 0); +pub const HEADER_VERSION: u32 = 175u32; #[doc = ""] -pub const HEADER_VERSION_COMPLETE: u32 = make_version(1, 2, HEADER_VERSION); +pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 2, HEADER_VERSION); #[doc = ""] pub type SampleMask = u32; #[doc = ""] @@ -286,6 +311,26 @@ vk_bitflags_wrapped!( 0b0, Flags ); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoBeginCodingFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoBeginCodingFlagsKHR, 0b0, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoEndCodingFlagsKHR(pub(crate) Flags); +vk_bitflags_wrapped!(VideoEndCodingFlagsKHR, 0b0, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoDecodeH264CreateFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoDecodeH264CreateFlagsEXT, 0b0, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[doc = ""] +pub struct VideoDecodeH265CreateFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(VideoDecodeH265CreateFlagsEXT, 0b0, Flags); define_handle!( Instance, INSTANCE, @@ -397,6 +442,8 @@ handle_nondispatchable!( handle_nondispatchable ! (SwapchainKHR , SWAPCHAIN_KHR , doc = "") ; handle_nondispatchable ! (DebugReportCallbackEXT , DEBUG_REPORT_CALLBACK_EXT , doc = "") ; handle_nondispatchable ! (DebugUtilsMessengerEXT , DEBUG_UTILS_MESSENGER_EXT , doc = "") ; +handle_nondispatchable ! (VideoSessionKHR , VIDEO_SESSION_KHR , doc = "") ; +handle_nondispatchable ! (VideoSessionParametersKHR , VIDEO_SESSION_PARAMETERS_KHR , doc = "") ; #[allow(non_camel_case_types)] #[doc = ""] pub type PFN_vkInternalAllocationNotification = Option< @@ -46069,6 +46116,358 @@ impl<'a> MutableDescriptorTypeCreateInfoVALVEBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub vertex_input_dynamic_state: Bool32, +} +impl ::std::default::Default for PhysicalDeviceVertexInputDynamicStateFeaturesEXT { + fn default() -> PhysicalDeviceVertexInputDynamicStateFeaturesEXT { + PhysicalDeviceVertexInputDynamicStateFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + vertex_input_dynamic_state: Bool32::default(), + } + } +} +impl PhysicalDeviceVertexInputDynamicStateFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'a> { + PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder { + inner: PhysicalDeviceVertexInputDynamicStateFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceVertexInputDynamicStateFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsDeviceCreateInfo + for PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceVertexInputDynamicStateFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceVertexInputDynamicStateFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder<'a> { + pub fn vertex_input_dynamic_state(mut self, vertex_input_dynamic_state: bool) -> Self { + self.inner.vertex_input_dynamic_state = vertex_input_dynamic_state.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceVertexInputDynamicStateFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VertexInputBindingDescription2EXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub binding: u32, + pub stride: u32, + pub input_rate: VertexInputRate, + pub divisor: u32, +} +impl ::std::default::Default for VertexInputBindingDescription2EXT { + fn default() -> VertexInputBindingDescription2EXT { + VertexInputBindingDescription2EXT { + s_type: StructureType::VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT, + p_next: ::std::ptr::null_mut(), + binding: u32::default(), + stride: u32::default(), + input_rate: VertexInputRate::default(), + divisor: u32::default(), + } + } +} +impl VertexInputBindingDescription2EXT { + pub fn builder<'a>() -> VertexInputBindingDescription2EXTBuilder<'a> { + VertexInputBindingDescription2EXTBuilder { + inner: VertexInputBindingDescription2EXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VertexInputBindingDescription2EXTBuilder<'a> { + inner: VertexInputBindingDescription2EXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVertexInputBindingDescription2EXT {} +impl<'a> ::std::ops::Deref for VertexInputBindingDescription2EXTBuilder<'a> { + type Target = VertexInputBindingDescription2EXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VertexInputBindingDescription2EXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VertexInputBindingDescription2EXTBuilder<'a> { + pub fn binding(mut self, binding: u32) -> Self { + self.inner.binding = binding; + self + } + pub fn stride(mut self, stride: u32) -> Self { + self.inner.stride = stride; + self + } + pub fn input_rate(mut self, input_rate: VertexInputRate) -> Self { + self.inner.input_rate = input_rate; + self + } + pub fn divisor(mut self, divisor: u32) -> Self { + self.inner.divisor = divisor; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VertexInputBindingDescription2EXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VertexInputAttributeDescription2EXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub location: u32, + pub binding: u32, + pub format: Format, + pub offset: u32, +} +impl ::std::default::Default for VertexInputAttributeDescription2EXT { + fn default() -> VertexInputAttributeDescription2EXT { + VertexInputAttributeDescription2EXT { + s_type: StructureType::VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT, + p_next: ::std::ptr::null_mut(), + location: u32::default(), + binding: u32::default(), + format: Format::default(), + offset: u32::default(), + } + } +} +impl VertexInputAttributeDescription2EXT { + pub fn builder<'a>() -> VertexInputAttributeDescription2EXTBuilder<'a> { + VertexInputAttributeDescription2EXTBuilder { + inner: VertexInputAttributeDescription2EXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VertexInputAttributeDescription2EXTBuilder<'a> { + inner: VertexInputAttributeDescription2EXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVertexInputAttributeDescription2EXT {} +impl<'a> ::std::ops::Deref for VertexInputAttributeDescription2EXTBuilder<'a> { + type Target = VertexInputAttributeDescription2EXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VertexInputAttributeDescription2EXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VertexInputAttributeDescription2EXTBuilder<'a> { + pub fn location(mut self, location: u32) -> Self { + self.inner.location = location; + self + } + pub fn binding(mut self, binding: u32) -> Self { + self.inner.binding = binding; + self + } + pub fn format(mut self, format: Format) -> Self { + self.inner.format = format; + self + } + pub fn offset(mut self, offset: u32) -> Self { + self.inner.offset = offset; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VertexInputAttributeDescription2EXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceColorWriteEnableFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub color_write_enable: Bool32, +} +impl ::std::default::Default for PhysicalDeviceColorWriteEnableFeaturesEXT { + fn default() -> PhysicalDeviceColorWriteEnableFeaturesEXT { + PhysicalDeviceColorWriteEnableFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + color_write_enable: Bool32::default(), + } + } +} +impl PhysicalDeviceColorWriteEnableFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceColorWriteEnableFeaturesEXTBuilder<'a> { + PhysicalDeviceColorWriteEnableFeaturesEXTBuilder { + inner: PhysicalDeviceColorWriteEnableFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceColorWriteEnableFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceColorWriteEnableFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceColorWriteEnableFeaturesEXTBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceColorWriteEnableFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceColorWriteEnableFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceColorWriteEnableFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceColorWriteEnableFeaturesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceColorWriteEnableFeaturesEXTBuilder<'a> { + pub fn color_write_enable(mut self, color_write_enable: bool) -> Self { + self.inner.color_write_enable = color_write_enable.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceColorWriteEnableFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PipelineColorWriteCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub attachment_count: u32, + pub p_color_write_enables: *const Bool32, +} +impl ::std::default::Default for PipelineColorWriteCreateInfoEXT { + fn default() -> PipelineColorWriteCreateInfoEXT { + PipelineColorWriteCreateInfoEXT { + s_type: StructureType::PIPELINE_COLOR_WRITE_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + attachment_count: u32::default(), + p_color_write_enables: ::std::ptr::null(), + } + } +} +impl PipelineColorWriteCreateInfoEXT { + pub fn builder<'a>() -> PipelineColorWriteCreateInfoEXTBuilder<'a> { + PipelineColorWriteCreateInfoEXTBuilder { + inner: PipelineColorWriteCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PipelineColorWriteCreateInfoEXTBuilder<'a> { + inner: PipelineColorWriteCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsPipelineColorBlendStateCreateInfo + for PipelineColorWriteCreateInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsPipelineColorBlendStateCreateInfo for PipelineColorWriteCreateInfoEXT {} +impl<'a> ::std::ops::Deref for PipelineColorWriteCreateInfoEXTBuilder<'a> { + type Target = PipelineColorWriteCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PipelineColorWriteCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PipelineColorWriteCreateInfoEXTBuilder<'a> { + pub fn color_write_enables(mut self, color_write_enables: &'a [Bool32]) -> Self { + self.inner.attachment_count = color_write_enables.len() as _; + self.inner.p_color_write_enables = color_write_enables.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PipelineColorWriteCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] #[doc = ""] pub struct MemoryBarrier2KHR { pub s_type: StructureType, @@ -46930,3 +47329,3588 @@ impl<'a> PhysicalDeviceSynchronization2FeaturesKHRBuilder<'a> { self.inner } } +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoQueueFamilyProperties2KHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub video_codec_operations: VideoCodecOperationFlagsKHR, +} +impl ::std::default::Default for VideoQueueFamilyProperties2KHR { + fn default() -> VideoQueueFamilyProperties2KHR { + VideoQueueFamilyProperties2KHR { + s_type: StructureType::VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR, + p_next: ::std::ptr::null_mut(), + video_codec_operations: VideoCodecOperationFlagsKHR::default(), + } + } +} +impl VideoQueueFamilyProperties2KHR { + pub fn builder<'a>() -> VideoQueueFamilyProperties2KHRBuilder<'a> { + VideoQueueFamilyProperties2KHRBuilder { + inner: VideoQueueFamilyProperties2KHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoQueueFamilyProperties2KHRBuilder<'a> { + inner: VideoQueueFamilyProperties2KHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsQueueFamilyProperties2 for VideoQueueFamilyProperties2KHRBuilder<'_> {} +unsafe impl ExtendsQueueFamilyProperties2 for VideoQueueFamilyProperties2KHR {} +impl<'a> ::std::ops::Deref for VideoQueueFamilyProperties2KHRBuilder<'a> { + type Target = VideoQueueFamilyProperties2KHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoQueueFamilyProperties2KHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoQueueFamilyProperties2KHRBuilder<'a> { + pub fn video_codec_operations( + mut self, + video_codec_operations: VideoCodecOperationFlagsKHR, + ) -> Self { + self.inner.video_codec_operations = video_codec_operations; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoQueueFamilyProperties2KHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoProfilesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub profile_count: u32, + pub p_profiles: *const VideoProfileKHR, +} +impl ::std::default::Default for VideoProfilesKHR { + fn default() -> VideoProfilesKHR { + VideoProfilesKHR { + s_type: StructureType::VIDEO_PROFILES_KHR, + p_next: ::std::ptr::null_mut(), + profile_count: u32::default(), + p_profiles: ::std::ptr::null(), + } + } +} +impl VideoProfilesKHR { + pub fn builder<'a>() -> VideoProfilesKHRBuilder<'a> { + VideoProfilesKHRBuilder { + inner: VideoProfilesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoProfilesKHRBuilder<'a> { + inner: VideoProfilesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsFormatProperties2 for VideoProfilesKHRBuilder<'_> {} +unsafe impl ExtendsFormatProperties2 for VideoProfilesKHR {} +unsafe impl ExtendsImageCreateInfo for VideoProfilesKHRBuilder<'_> {} +unsafe impl ExtendsImageCreateInfo for VideoProfilesKHR {} +unsafe impl ExtendsImageViewCreateInfo for VideoProfilesKHRBuilder<'_> {} +unsafe impl ExtendsImageViewCreateInfo for VideoProfilesKHR {} +unsafe impl ExtendsBufferCreateInfo for VideoProfilesKHRBuilder<'_> {} +unsafe impl ExtendsBufferCreateInfo for VideoProfilesKHR {} +impl<'a> ::std::ops::Deref for VideoProfilesKHRBuilder<'a> { + type Target = VideoProfilesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoProfilesKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoProfilesKHRBuilder<'a> { + pub fn profile_count(mut self, profile_count: u32) -> Self { + self.inner.profile_count = profile_count; + self + } + pub fn profiles(mut self, profiles: &'a VideoProfileKHR) -> Self { + self.inner.p_profiles = profiles; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoProfilesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceVideoFormatInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub image_usage: ImageUsageFlags, + pub p_video_profiles: *const VideoProfilesKHR, +} +impl ::std::default::Default for PhysicalDeviceVideoFormatInfoKHR { + fn default() -> PhysicalDeviceVideoFormatInfoKHR { + PhysicalDeviceVideoFormatInfoKHR { + s_type: StructureType::PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR, + p_next: ::std::ptr::null(), + image_usage: ImageUsageFlags::default(), + p_video_profiles: ::std::ptr::null(), + } + } +} +impl PhysicalDeviceVideoFormatInfoKHR { + pub fn builder<'a>() -> PhysicalDeviceVideoFormatInfoKHRBuilder<'a> { + PhysicalDeviceVideoFormatInfoKHRBuilder { + inner: PhysicalDeviceVideoFormatInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceVideoFormatInfoKHRBuilder<'a> { + inner: PhysicalDeviceVideoFormatInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceVideoFormatInfoKHR {} +impl<'a> ::std::ops::Deref for PhysicalDeviceVideoFormatInfoKHRBuilder<'a> { + type Target = PhysicalDeviceVideoFormatInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceVideoFormatInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceVideoFormatInfoKHRBuilder<'a> { + pub fn image_usage(mut self, image_usage: ImageUsageFlags) -> Self { + self.inner.image_usage = image_usage; + self + } + pub fn video_profiles(mut self, video_profiles: &'a VideoProfilesKHR) -> Self { + self.inner.p_video_profiles = video_profiles; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceVideoFormatInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoFormatPropertiesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub format: Format, +} +impl ::std::default::Default for VideoFormatPropertiesKHR { + fn default() -> VideoFormatPropertiesKHR { + VideoFormatPropertiesKHR { + s_type: StructureType::VIDEO_FORMAT_PROPERTIES_KHR, + p_next: ::std::ptr::null_mut(), + format: Format::default(), + } + } +} +impl VideoFormatPropertiesKHR { + pub fn builder<'a>() -> VideoFormatPropertiesKHRBuilder<'a> { + VideoFormatPropertiesKHRBuilder { + inner: VideoFormatPropertiesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoFormatPropertiesKHRBuilder<'a> { + inner: VideoFormatPropertiesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoFormatPropertiesKHR {} +impl<'a> ::std::ops::Deref for VideoFormatPropertiesKHRBuilder<'a> { + type Target = VideoFormatPropertiesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoFormatPropertiesKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoFormatPropertiesKHRBuilder<'a> { + pub fn format(mut self, format: Format) -> Self { + self.inner.format = format; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoFormatPropertiesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoProfileKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub video_codec_operation: VideoCodecOperationFlagsKHR, + pub chroma_subsampling: VideoChromaSubsamplingFlagsKHR, + pub luma_bit_depth: VideoComponentBitDepthFlagsKHR, + pub chroma_bit_depth: VideoComponentBitDepthFlagsKHR, +} +impl ::std::default::Default for VideoProfileKHR { + fn default() -> VideoProfileKHR { + VideoProfileKHR { + s_type: StructureType::VIDEO_PROFILE_KHR, + p_next: ::std::ptr::null_mut(), + video_codec_operation: VideoCodecOperationFlagsKHR::default(), + chroma_subsampling: VideoChromaSubsamplingFlagsKHR::default(), + luma_bit_depth: VideoComponentBitDepthFlagsKHR::default(), + chroma_bit_depth: VideoComponentBitDepthFlagsKHR::default(), + } + } +} +impl VideoProfileKHR { + pub fn builder<'a>() -> VideoProfileKHRBuilder<'a> { + VideoProfileKHRBuilder { + inner: VideoProfileKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoProfileKHRBuilder<'a> { + inner: VideoProfileKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsQueryPoolCreateInfo for VideoProfileKHRBuilder<'_> {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoProfileKHR {} +unsafe impl ExtendsFormatProperties2 for VideoProfileKHRBuilder<'_> {} +unsafe impl ExtendsFormatProperties2 for VideoProfileKHR {} +unsafe impl ExtendsImageCreateInfo for VideoProfileKHRBuilder<'_> {} +unsafe impl ExtendsImageCreateInfo for VideoProfileKHR {} +unsafe impl ExtendsImageViewCreateInfo for VideoProfileKHRBuilder<'_> {} +unsafe impl ExtendsImageViewCreateInfo for VideoProfileKHR {} +unsafe impl ExtendsBufferCreateInfo for VideoProfileKHRBuilder<'_> {} +unsafe impl ExtendsBufferCreateInfo for VideoProfileKHR {} +impl<'a> ::std::ops::Deref for VideoProfileKHRBuilder<'a> { + type Target = VideoProfileKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoProfileKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoProfileKHRBuilder<'a> { + pub fn video_codec_operation( + mut self, + video_codec_operation: VideoCodecOperationFlagsKHR, + ) -> Self { + self.inner.video_codec_operation = video_codec_operation; + self + } + pub fn chroma_subsampling( + mut self, + chroma_subsampling: VideoChromaSubsamplingFlagsKHR, + ) -> Self { + self.inner.chroma_subsampling = chroma_subsampling; + self + } + pub fn luma_bit_depth(mut self, luma_bit_depth: VideoComponentBitDepthFlagsKHR) -> Self { + self.inner.luma_bit_depth = luma_bit_depth; + self + } + pub fn chroma_bit_depth(mut self, chroma_bit_depth: VideoComponentBitDepthFlagsKHR) -> Self { + self.inner.chroma_bit_depth = chroma_bit_depth; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoProfileKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoCapabilitiesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub capability_flags: VideoCapabilitiesFlagsKHR, + pub min_bitstream_buffer_offset_alignment: DeviceSize, + pub min_bitstream_buffer_size_alignment: DeviceSize, + pub video_picture_extent_granularity: Extent2D, + pub min_extent: Extent2D, + pub max_extent: Extent2D, + pub max_reference_pictures_slots_count: u32, + pub max_reference_pictures_active_count: u32, +} +impl ::std::default::Default for VideoCapabilitiesKHR { + fn default() -> VideoCapabilitiesKHR { + VideoCapabilitiesKHR { + s_type: StructureType::VIDEO_CAPABILITIES_KHR, + p_next: ::std::ptr::null_mut(), + capability_flags: VideoCapabilitiesFlagsKHR::default(), + min_bitstream_buffer_offset_alignment: DeviceSize::default(), + min_bitstream_buffer_size_alignment: DeviceSize::default(), + video_picture_extent_granularity: Extent2D::default(), + min_extent: Extent2D::default(), + max_extent: Extent2D::default(), + max_reference_pictures_slots_count: u32::default(), + max_reference_pictures_active_count: u32::default(), + } + } +} +impl VideoCapabilitiesKHR { + pub fn builder<'a>() -> VideoCapabilitiesKHRBuilder<'a> { + VideoCapabilitiesKHRBuilder { + inner: VideoCapabilitiesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoCapabilitiesKHRBuilder<'a> { + inner: VideoCapabilitiesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoCapabilitiesKHR {} +impl<'a> ::std::ops::Deref for VideoCapabilitiesKHRBuilder<'a> { + type Target = VideoCapabilitiesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoCapabilitiesKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoCapabilitiesKHRBuilder<'a> { + pub fn capability_flags(mut self, capability_flags: VideoCapabilitiesFlagsKHR) -> Self { + self.inner.capability_flags = capability_flags; + self + } + pub fn min_bitstream_buffer_offset_alignment( + mut self, + min_bitstream_buffer_offset_alignment: DeviceSize, + ) -> Self { + self.inner.min_bitstream_buffer_offset_alignment = min_bitstream_buffer_offset_alignment; + self + } + pub fn min_bitstream_buffer_size_alignment( + mut self, + min_bitstream_buffer_size_alignment: DeviceSize, + ) -> Self { + self.inner.min_bitstream_buffer_size_alignment = min_bitstream_buffer_size_alignment; + self + } + pub fn video_picture_extent_granularity( + mut self, + video_picture_extent_granularity: Extent2D, + ) -> Self { + self.inner.video_picture_extent_granularity = video_picture_extent_granularity; + self + } + pub fn min_extent(mut self, min_extent: Extent2D) -> Self { + self.inner.min_extent = min_extent; + self + } + pub fn max_extent(mut self, max_extent: Extent2D) -> Self { + self.inner.max_extent = max_extent; + self + } + pub fn max_reference_pictures_slots_count( + mut self, + max_reference_pictures_slots_count: u32, + ) -> Self { + self.inner.max_reference_pictures_slots_count = max_reference_pictures_slots_count; + self + } + pub fn max_reference_pictures_active_count( + mut self, + max_reference_pictures_active_count: u32, + ) -> Self { + self.inner.max_reference_pictures_active_count = max_reference_pictures_active_count; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoCapabilitiesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoGetMemoryPropertiesKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub memory_bind_index: u32, + pub p_memory_requirements: *mut MemoryRequirements2, +} +impl ::std::default::Default for VideoGetMemoryPropertiesKHR { + fn default() -> VideoGetMemoryPropertiesKHR { + VideoGetMemoryPropertiesKHR { + s_type: StructureType::VIDEO_GET_MEMORY_PROPERTIES_KHR, + p_next: ::std::ptr::null(), + memory_bind_index: u32::default(), + p_memory_requirements: ::std::ptr::null_mut(), + } + } +} +impl VideoGetMemoryPropertiesKHR { + pub fn builder<'a>() -> VideoGetMemoryPropertiesKHRBuilder<'a> { + VideoGetMemoryPropertiesKHRBuilder { + inner: VideoGetMemoryPropertiesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoGetMemoryPropertiesKHRBuilder<'a> { + inner: VideoGetMemoryPropertiesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoGetMemoryPropertiesKHR {} +impl<'a> ::std::ops::Deref for VideoGetMemoryPropertiesKHRBuilder<'a> { + type Target = VideoGetMemoryPropertiesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoGetMemoryPropertiesKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoGetMemoryPropertiesKHRBuilder<'a> { + pub fn memory_bind_index(mut self, memory_bind_index: u32) -> Self { + self.inner.memory_bind_index = memory_bind_index; + self + } + pub fn memory_requirements(mut self, memory_requirements: &'a mut MemoryRequirements2) -> Self { + self.inner.p_memory_requirements = memory_requirements; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoGetMemoryPropertiesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoBindMemoryKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub memory_bind_index: u32, + pub memory: DeviceMemory, + pub memory_offset: DeviceSize, + pub memory_size: DeviceSize, +} +impl ::std::default::Default for VideoBindMemoryKHR { + fn default() -> VideoBindMemoryKHR { + VideoBindMemoryKHR { + s_type: StructureType::VIDEO_BIND_MEMORY_KHR, + p_next: ::std::ptr::null(), + memory_bind_index: u32::default(), + memory: DeviceMemory::default(), + memory_offset: DeviceSize::default(), + memory_size: DeviceSize::default(), + } + } +} +impl VideoBindMemoryKHR { + pub fn builder<'a>() -> VideoBindMemoryKHRBuilder<'a> { + VideoBindMemoryKHRBuilder { + inner: VideoBindMemoryKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoBindMemoryKHRBuilder<'a> { + inner: VideoBindMemoryKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoBindMemoryKHR {} +impl<'a> ::std::ops::Deref for VideoBindMemoryKHRBuilder<'a> { + type Target = VideoBindMemoryKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoBindMemoryKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoBindMemoryKHRBuilder<'a> { + pub fn memory_bind_index(mut self, memory_bind_index: u32) -> Self { + self.inner.memory_bind_index = memory_bind_index; + self + } + pub fn memory(mut self, memory: DeviceMemory) -> Self { + self.inner.memory = memory; + self + } + pub fn memory_offset(mut self, memory_offset: DeviceSize) -> Self { + self.inner.memory_offset = memory_offset; + self + } + pub fn memory_size(mut self, memory_size: DeviceSize) -> Self { + self.inner.memory_size = memory_size; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoBindMemoryKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoPictureResourceKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub coded_offset: Offset2D, + pub coded_extent: Extent2D, + pub base_array_layer: u32, + pub image_view_binding: ImageView, +} +impl ::std::default::Default for VideoPictureResourceKHR { + fn default() -> VideoPictureResourceKHR { + VideoPictureResourceKHR { + s_type: StructureType::VIDEO_PICTURE_RESOURCE_KHR, + p_next: ::std::ptr::null(), + coded_offset: Offset2D::default(), + coded_extent: Extent2D::default(), + base_array_layer: u32::default(), + image_view_binding: ImageView::default(), + } + } +} +impl VideoPictureResourceKHR { + pub fn builder<'a>() -> VideoPictureResourceKHRBuilder<'a> { + VideoPictureResourceKHRBuilder { + inner: VideoPictureResourceKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoPictureResourceKHRBuilder<'a> { + inner: VideoPictureResourceKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoPictureResourceKHR {} +impl<'a> ::std::ops::Deref for VideoPictureResourceKHRBuilder<'a> { + type Target = VideoPictureResourceKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoPictureResourceKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoPictureResourceKHRBuilder<'a> { + pub fn coded_offset(mut self, coded_offset: Offset2D) -> Self { + self.inner.coded_offset = coded_offset; + self + } + pub fn coded_extent(mut self, coded_extent: Extent2D) -> Self { + self.inner.coded_extent = coded_extent; + self + } + pub fn base_array_layer(mut self, base_array_layer: u32) -> Self { + self.inner.base_array_layer = base_array_layer; + self + } + pub fn image_view_binding(mut self, image_view_binding: ImageView) -> Self { + self.inner.image_view_binding = image_view_binding; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoPictureResourceKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoReferenceSlotKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub slot_index: i8, + pub p_picture_resource: *const VideoPictureResourceKHR, +} +impl ::std::default::Default for VideoReferenceSlotKHR { + fn default() -> VideoReferenceSlotKHR { + VideoReferenceSlotKHR { + s_type: StructureType::VIDEO_REFERENCE_SLOT_KHR, + p_next: ::std::ptr::null(), + slot_index: i8::default(), + p_picture_resource: ::std::ptr::null(), + } + } +} +impl VideoReferenceSlotKHR { + pub fn builder<'a>() -> VideoReferenceSlotKHRBuilder<'a> { + VideoReferenceSlotKHRBuilder { + inner: VideoReferenceSlotKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoReferenceSlotKHRBuilder<'a> { + inner: VideoReferenceSlotKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoReferenceSlotKHR {} +impl<'a> ::std::ops::Deref for VideoReferenceSlotKHRBuilder<'a> { + type Target = VideoReferenceSlotKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoReferenceSlotKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoReferenceSlotKHRBuilder<'a> { + pub fn slot_index(mut self, slot_index: i8) -> Self { + self.inner.slot_index = slot_index; + self + } + pub fn picture_resource(mut self, picture_resource: &'a VideoPictureResourceKHR) -> Self { + self.inner.p_picture_resource = picture_resource; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoReferenceSlotKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoDecodeFlagsKHR, + pub coded_offset: Offset2D, + pub coded_extent: Extent2D, + pub src_buffer: Buffer, + pub src_buffer_offset: DeviceSize, + pub src_buffer_range: DeviceSize, + pub dst_picture_resource: VideoPictureResourceKHR, + pub p_setup_reference_slot: *const VideoReferenceSlotKHR, + pub reference_slot_count: u32, + pub p_reference_slots: *const VideoReferenceSlotKHR, +} +impl ::std::default::Default for VideoDecodeInfoKHR { + fn default() -> VideoDecodeInfoKHR { + VideoDecodeInfoKHR { + s_type: StructureType::VIDEO_DECODE_INFO_KHR, + p_next: ::std::ptr::null(), + flags: VideoDecodeFlagsKHR::default(), + coded_offset: Offset2D::default(), + coded_extent: Extent2D::default(), + src_buffer: Buffer::default(), + src_buffer_offset: DeviceSize::default(), + src_buffer_range: DeviceSize::default(), + dst_picture_resource: VideoPictureResourceKHR::default(), + p_setup_reference_slot: ::std::ptr::null(), + reference_slot_count: u32::default(), + p_reference_slots: ::std::ptr::null(), + } + } +} +impl VideoDecodeInfoKHR { + pub fn builder<'a>() -> VideoDecodeInfoKHRBuilder<'a> { + VideoDecodeInfoKHRBuilder { + inner: VideoDecodeInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeInfoKHRBuilder<'a> { + inner: VideoDecodeInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoDecodeInfoKHR {} +impl<'a> ::std::ops::Deref for VideoDecodeInfoKHRBuilder<'a> { + type Target = VideoDecodeInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeInfoKHRBuilder<'a> { + pub fn flags(mut self, flags: VideoDecodeFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + pub fn coded_offset(mut self, coded_offset: Offset2D) -> Self { + self.inner.coded_offset = coded_offset; + self + } + pub fn coded_extent(mut self, coded_extent: Extent2D) -> Self { + self.inner.coded_extent = coded_extent; + self + } + pub fn src_buffer(mut self, src_buffer: Buffer) -> Self { + self.inner.src_buffer = src_buffer; + self + } + pub fn src_buffer_offset(mut self, src_buffer_offset: DeviceSize) -> Self { + self.inner.src_buffer_offset = src_buffer_offset; + self + } + pub fn src_buffer_range(mut self, src_buffer_range: DeviceSize) -> Self { + self.inner.src_buffer_range = src_buffer_range; + self + } + pub fn dst_picture_resource(mut self, dst_picture_resource: VideoPictureResourceKHR) -> Self { + self.inner.dst_picture_resource = dst_picture_resource; + self + } + pub fn setup_reference_slot(mut self, setup_reference_slot: &'a VideoReferenceSlotKHR) -> Self { + self.inner.p_setup_reference_slot = setup_reference_slot; + self + } + pub fn reference_slots(mut self, reference_slots: &'a [VideoReferenceSlotKHR]) -> Self { + self.inner.reference_slot_count = reference_slots.len() as _; + self.inner.p_reference_slots = reference_slots.as_ptr(); + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264ProfileEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub std_profile_idc: StdVideoH264ProfileIdc, + pub field_layout: VideoDecodeH264FieldLayoutFlagsEXT, +} +impl ::std::default::Default for VideoDecodeH264ProfileEXT { + fn default() -> VideoDecodeH264ProfileEXT { + VideoDecodeH264ProfileEXT { + s_type: StructureType::VIDEO_DECODE_H264_PROFILE_EXT, + p_next: ::std::ptr::null(), + std_profile_idc: StdVideoH264ProfileIdc::default(), + field_layout: VideoDecodeH264FieldLayoutFlagsEXT::default(), + } + } +} +impl VideoDecodeH264ProfileEXT { + pub fn builder<'a>() -> VideoDecodeH264ProfileEXTBuilder<'a> { + VideoDecodeH264ProfileEXTBuilder { + inner: VideoDecodeH264ProfileEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264ProfileEXTBuilder<'a> { + inner: VideoDecodeH264ProfileEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoDecodeH264ProfileEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH264ProfileEXTBuilder<'a> { + type Target = VideoDecodeH264ProfileEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264ProfileEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264ProfileEXTBuilder<'a> { + pub fn std_profile_idc(mut self, std_profile_idc: StdVideoH264ProfileIdc) -> Self { + self.inner.std_profile_idc = std_profile_idc; + self + } + pub fn field_layout(mut self, field_layout: VideoDecodeH264FieldLayoutFlagsEXT) -> Self { + self.inner.field_layout = field_layout; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264ProfileEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264CapabilitiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_level: u32, + pub field_offset_granularity: Offset2D, + pub std_extension_version: ExtensionProperties, +} +impl ::std::default::Default for VideoDecodeH264CapabilitiesEXT { + fn default() -> VideoDecodeH264CapabilitiesEXT { + VideoDecodeH264CapabilitiesEXT { + s_type: StructureType::VIDEO_DECODE_H264_CAPABILITIES_EXT, + p_next: ::std::ptr::null_mut(), + max_level: u32::default(), + field_offset_granularity: Offset2D::default(), + std_extension_version: ExtensionProperties::default(), + } + } +} +impl VideoDecodeH264CapabilitiesEXT { + pub fn builder<'a>() -> VideoDecodeH264CapabilitiesEXTBuilder<'a> { + VideoDecodeH264CapabilitiesEXTBuilder { + inner: VideoDecodeH264CapabilitiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264CapabilitiesEXTBuilder<'a> { + inner: VideoDecodeH264CapabilitiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeH264CapabilitiesEXTBuilder<'_> {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeH264CapabilitiesEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH264CapabilitiesEXTBuilder<'a> { + type Target = VideoDecodeH264CapabilitiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264CapabilitiesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264CapabilitiesEXTBuilder<'a> { + pub fn max_level(mut self, max_level: u32) -> Self { + self.inner.max_level = max_level; + self + } + pub fn field_offset_granularity(mut self, field_offset_granularity: Offset2D) -> Self { + self.inner.field_offset_granularity = field_offset_granularity; + self + } + pub fn std_extension_version(mut self, std_extension_version: ExtensionProperties) -> Self { + self.inner.std_extension_version = std_extension_version; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264CapabilitiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264SessionCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoDecodeH264CreateFlagsEXT, + pub p_std_extension_version: *const ExtensionProperties, +} +impl ::std::default::Default for VideoDecodeH264SessionCreateInfoEXT { + fn default() -> VideoDecodeH264SessionCreateInfoEXT { + VideoDecodeH264SessionCreateInfoEXT { + s_type: StructureType::VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + flags: VideoDecodeH264CreateFlagsEXT::default(), + p_std_extension_version: ::std::ptr::null(), + } + } +} +impl VideoDecodeH264SessionCreateInfoEXT { + pub fn builder<'a>() -> VideoDecodeH264SessionCreateInfoEXTBuilder<'a> { + VideoDecodeH264SessionCreateInfoEXTBuilder { + inner: VideoDecodeH264SessionCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264SessionCreateInfoEXTBuilder<'a> { + inner: VideoDecodeH264SessionCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoDecodeH264SessionCreateInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoDecodeH264SessionCreateInfoEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH264SessionCreateInfoEXTBuilder<'a> { + type Target = VideoDecodeH264SessionCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264SessionCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264SessionCreateInfoEXTBuilder<'a> { + pub fn flags(mut self, flags: VideoDecodeH264CreateFlagsEXT) -> Self { + self.inner.flags = flags; + self + } + pub fn std_extension_version(mut self, std_extension_version: &'a ExtensionProperties) -> Self { + self.inner.p_std_extension_version = std_extension_version; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264SessionCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264SessionParametersAddInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub sps_std_count: u32, + pub p_sps_std: *const StdVideoH264SequenceParameterSet, + pub pps_std_count: u32, + pub p_pps_std: *const StdVideoH264PictureParameterSet, +} +impl ::std::default::Default for VideoDecodeH264SessionParametersAddInfoEXT { + fn default() -> VideoDecodeH264SessionParametersAddInfoEXT { + VideoDecodeH264SessionParametersAddInfoEXT { + s_type: StructureType::VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT, + p_next: ::std::ptr::null(), + sps_std_count: u32::default(), + p_sps_std: ::std::ptr::null(), + pps_std_count: u32::default(), + p_pps_std: ::std::ptr::null(), + } + } +} +impl VideoDecodeH264SessionParametersAddInfoEXT { + pub fn builder<'a>() -> VideoDecodeH264SessionParametersAddInfoEXTBuilder<'a> { + VideoDecodeH264SessionParametersAddInfoEXTBuilder { + inner: VideoDecodeH264SessionParametersAddInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264SessionParametersAddInfoEXTBuilder<'a> { + inner: VideoDecodeH264SessionParametersAddInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoDecodeH264SessionParametersAddInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoDecodeH264SessionParametersAddInfoEXT +{ +} +impl<'a> ::std::ops::Deref for VideoDecodeH264SessionParametersAddInfoEXTBuilder<'a> { + type Target = VideoDecodeH264SessionParametersAddInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264SessionParametersAddInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264SessionParametersAddInfoEXTBuilder<'a> { + pub fn sps_std(mut self, sps_std: &'a [StdVideoH264SequenceParameterSet]) -> Self { + self.inner.sps_std_count = sps_std.len() as _; + self.inner.p_sps_std = sps_std.as_ptr(); + self + } + pub fn pps_std(mut self, pps_std: &'a [StdVideoH264PictureParameterSet]) -> Self { + self.inner.pps_std_count = pps_std.len() as _; + self.inner.p_pps_std = pps_std.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264SessionParametersAddInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264SessionParametersCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub max_sps_std_count: u32, + pub max_pps_std_count: u32, + pub p_parameters_add_info: *const VideoDecodeH264SessionParametersAddInfoEXT, +} +impl ::std::default::Default for VideoDecodeH264SessionParametersCreateInfoEXT { + fn default() -> VideoDecodeH264SessionParametersCreateInfoEXT { + VideoDecodeH264SessionParametersCreateInfoEXT { + s_type: StructureType::VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + max_sps_std_count: u32::default(), + max_pps_std_count: u32::default(), + p_parameters_add_info: ::std::ptr::null(), + } + } +} +impl VideoDecodeH264SessionParametersCreateInfoEXT { + pub fn builder<'a>() -> VideoDecodeH264SessionParametersCreateInfoEXTBuilder<'a> { + VideoDecodeH264SessionParametersCreateInfoEXTBuilder { + inner: VideoDecodeH264SessionParametersCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264SessionParametersCreateInfoEXTBuilder<'a> { + inner: VideoDecodeH264SessionParametersCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoDecodeH264SessionParametersCreateInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoDecodeH264SessionParametersCreateInfoEXT +{ +} +impl<'a> ::std::ops::Deref for VideoDecodeH264SessionParametersCreateInfoEXTBuilder<'a> { + type Target = VideoDecodeH264SessionParametersCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264SessionParametersCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264SessionParametersCreateInfoEXTBuilder<'a> { + pub fn max_sps_std_count(mut self, max_sps_std_count: u32) -> Self { + self.inner.max_sps_std_count = max_sps_std_count; + self + } + pub fn max_pps_std_count(mut self, max_pps_std_count: u32) -> Self { + self.inner.max_pps_std_count = max_pps_std_count; + self + } + pub fn parameters_add_info( + mut self, + parameters_add_info: &'a VideoDecodeH264SessionParametersAddInfoEXT, + ) -> Self { + self.inner.p_parameters_add_info = parameters_add_info; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264SessionParametersCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264PictureInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_std_picture_info: *const StdVideoDecodeH264PictureInfo, + pub slices_count: u32, + pub p_slices_data_offsets: *const u32, +} +impl ::std::default::Default for VideoDecodeH264PictureInfoEXT { + fn default() -> VideoDecodeH264PictureInfoEXT { + VideoDecodeH264PictureInfoEXT { + s_type: StructureType::VIDEO_DECODE_H264_PICTURE_INFO_EXT, + p_next: ::std::ptr::null(), + p_std_picture_info: ::std::ptr::null(), + slices_count: u32::default(), + p_slices_data_offsets: ::std::ptr::null(), + } + } +} +impl VideoDecodeH264PictureInfoEXT { + pub fn builder<'a>() -> VideoDecodeH264PictureInfoEXTBuilder<'a> { + VideoDecodeH264PictureInfoEXTBuilder { + inner: VideoDecodeH264PictureInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264PictureInfoEXTBuilder<'a> { + inner: VideoDecodeH264PictureInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoDecodeInfoKHR for VideoDecodeH264PictureInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoDecodeInfoKHR for VideoDecodeH264PictureInfoEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH264PictureInfoEXTBuilder<'a> { + type Target = VideoDecodeH264PictureInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264PictureInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264PictureInfoEXTBuilder<'a> { + pub fn std_picture_info(mut self, std_picture_info: &'a StdVideoDecodeH264PictureInfo) -> Self { + self.inner.p_std_picture_info = std_picture_info; + self + } + pub fn slices_data_offsets(mut self, slices_data_offsets: &'a [u32]) -> Self { + self.inner.slices_count = slices_data_offsets.len() as _; + self.inner.p_slices_data_offsets = slices_data_offsets.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264PictureInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264DpbSlotInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_std_reference_info: *const StdVideoDecodeH264ReferenceInfo, +} +impl ::std::default::Default for VideoDecodeH264DpbSlotInfoEXT { + fn default() -> VideoDecodeH264DpbSlotInfoEXT { + VideoDecodeH264DpbSlotInfoEXT { + s_type: StructureType::VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT, + p_next: ::std::ptr::null(), + p_std_reference_info: ::std::ptr::null(), + } + } +} +impl VideoDecodeH264DpbSlotInfoEXT { + pub fn builder<'a>() -> VideoDecodeH264DpbSlotInfoEXTBuilder<'a> { + VideoDecodeH264DpbSlotInfoEXTBuilder { + inner: VideoDecodeH264DpbSlotInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264DpbSlotInfoEXTBuilder<'a> { + inner: VideoDecodeH264DpbSlotInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoReferenceSlotKHR for VideoDecodeH264DpbSlotInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoReferenceSlotKHR for VideoDecodeH264DpbSlotInfoEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH264DpbSlotInfoEXTBuilder<'a> { + type Target = VideoDecodeH264DpbSlotInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264DpbSlotInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264DpbSlotInfoEXTBuilder<'a> { + pub fn std_reference_info( + mut self, + std_reference_info: &'a StdVideoDecodeH264ReferenceInfo, + ) -> Self { + self.inner.p_std_reference_info = std_reference_info; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264DpbSlotInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH264MvcEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_std_mvc: *const StdVideoDecodeH264Mvc, +} +impl ::std::default::Default for VideoDecodeH264MvcEXT { + fn default() -> VideoDecodeH264MvcEXT { + VideoDecodeH264MvcEXT { + s_type: StructureType::VIDEO_DECODE_H264_MVC_EXT, + p_next: ::std::ptr::null(), + p_std_mvc: ::std::ptr::null(), + } + } +} +impl VideoDecodeH264MvcEXT { + pub fn builder<'a>() -> VideoDecodeH264MvcEXTBuilder<'a> { + VideoDecodeH264MvcEXTBuilder { + inner: VideoDecodeH264MvcEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH264MvcEXTBuilder<'a> { + inner: VideoDecodeH264MvcEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoDecodeH264MvcEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH264MvcEXTBuilder<'a> { + type Target = VideoDecodeH264MvcEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH264MvcEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH264MvcEXTBuilder<'a> { + pub fn std_mvc(mut self, std_mvc: &'a StdVideoDecodeH264Mvc) -> Self { + self.inner.p_std_mvc = std_mvc; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH264MvcEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265ProfileEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub std_profile_idc: StdVideoH265ProfileIdc, +} +impl ::std::default::Default for VideoDecodeH265ProfileEXT { + fn default() -> VideoDecodeH265ProfileEXT { + VideoDecodeH265ProfileEXT { + s_type: StructureType::VIDEO_DECODE_H265_PROFILE_EXT, + p_next: ::std::ptr::null(), + std_profile_idc: StdVideoH265ProfileIdc::default(), + } + } +} +impl VideoDecodeH265ProfileEXT { + pub fn builder<'a>() -> VideoDecodeH265ProfileEXTBuilder<'a> { + VideoDecodeH265ProfileEXTBuilder { + inner: VideoDecodeH265ProfileEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265ProfileEXTBuilder<'a> { + inner: VideoDecodeH265ProfileEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoDecodeH265ProfileEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH265ProfileEXTBuilder<'a> { + type Target = VideoDecodeH265ProfileEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265ProfileEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265ProfileEXTBuilder<'a> { + pub fn std_profile_idc(mut self, std_profile_idc: StdVideoH265ProfileIdc) -> Self { + self.inner.std_profile_idc = std_profile_idc; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265ProfileEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265CapabilitiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_level: u32, + pub std_extension_version: ExtensionProperties, +} +impl ::std::default::Default for VideoDecodeH265CapabilitiesEXT { + fn default() -> VideoDecodeH265CapabilitiesEXT { + VideoDecodeH265CapabilitiesEXT { + s_type: StructureType::VIDEO_DECODE_H265_CAPABILITIES_EXT, + p_next: ::std::ptr::null_mut(), + max_level: u32::default(), + std_extension_version: ExtensionProperties::default(), + } + } +} +impl VideoDecodeH265CapabilitiesEXT { + pub fn builder<'a>() -> VideoDecodeH265CapabilitiesEXTBuilder<'a> { + VideoDecodeH265CapabilitiesEXTBuilder { + inner: VideoDecodeH265CapabilitiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265CapabilitiesEXTBuilder<'a> { + inner: VideoDecodeH265CapabilitiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeH265CapabilitiesEXTBuilder<'_> {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeH265CapabilitiesEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH265CapabilitiesEXTBuilder<'a> { + type Target = VideoDecodeH265CapabilitiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265CapabilitiesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265CapabilitiesEXTBuilder<'a> { + pub fn max_level(mut self, max_level: u32) -> Self { + self.inner.max_level = max_level; + self + } + pub fn std_extension_version(mut self, std_extension_version: ExtensionProperties) -> Self { + self.inner.std_extension_version = std_extension_version; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265CapabilitiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265SessionCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoDecodeH265CreateFlagsEXT, + pub p_std_extension_version: *const ExtensionProperties, +} +impl ::std::default::Default for VideoDecodeH265SessionCreateInfoEXT { + fn default() -> VideoDecodeH265SessionCreateInfoEXT { + VideoDecodeH265SessionCreateInfoEXT { + s_type: StructureType::VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + flags: VideoDecodeH265CreateFlagsEXT::default(), + p_std_extension_version: ::std::ptr::null(), + } + } +} +impl VideoDecodeH265SessionCreateInfoEXT { + pub fn builder<'a>() -> VideoDecodeH265SessionCreateInfoEXTBuilder<'a> { + VideoDecodeH265SessionCreateInfoEXTBuilder { + inner: VideoDecodeH265SessionCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265SessionCreateInfoEXTBuilder<'a> { + inner: VideoDecodeH265SessionCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoDecodeH265SessionCreateInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoDecodeH265SessionCreateInfoEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH265SessionCreateInfoEXTBuilder<'a> { + type Target = VideoDecodeH265SessionCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265SessionCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265SessionCreateInfoEXTBuilder<'a> { + pub fn flags(mut self, flags: VideoDecodeH265CreateFlagsEXT) -> Self { + self.inner.flags = flags; + self + } + pub fn std_extension_version(mut self, std_extension_version: &'a ExtensionProperties) -> Self { + self.inner.p_std_extension_version = std_extension_version; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265SessionCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265SessionParametersAddInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub sps_std_count: u32, + pub p_sps_std: *const StdVideoH265SequenceParameterSet, + pub pps_std_count: u32, + pub p_pps_std: *const StdVideoH265PictureParameterSet, +} +impl ::std::default::Default for VideoDecodeH265SessionParametersAddInfoEXT { + fn default() -> VideoDecodeH265SessionParametersAddInfoEXT { + VideoDecodeH265SessionParametersAddInfoEXT { + s_type: StructureType::VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT, + p_next: ::std::ptr::null(), + sps_std_count: u32::default(), + p_sps_std: ::std::ptr::null(), + pps_std_count: u32::default(), + p_pps_std: ::std::ptr::null(), + } + } +} +impl VideoDecodeH265SessionParametersAddInfoEXT { + pub fn builder<'a>() -> VideoDecodeH265SessionParametersAddInfoEXTBuilder<'a> { + VideoDecodeH265SessionParametersAddInfoEXTBuilder { + inner: VideoDecodeH265SessionParametersAddInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265SessionParametersAddInfoEXTBuilder<'a> { + inner: VideoDecodeH265SessionParametersAddInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoDecodeH265SessionParametersAddInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoDecodeH265SessionParametersAddInfoEXT +{ +} +impl<'a> ::std::ops::Deref for VideoDecodeH265SessionParametersAddInfoEXTBuilder<'a> { + type Target = VideoDecodeH265SessionParametersAddInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265SessionParametersAddInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265SessionParametersAddInfoEXTBuilder<'a> { + pub fn sps_std(mut self, sps_std: &'a [StdVideoH265SequenceParameterSet]) -> Self { + self.inner.sps_std_count = sps_std.len() as _; + self.inner.p_sps_std = sps_std.as_ptr(); + self + } + pub fn pps_std(mut self, pps_std: &'a [StdVideoH265PictureParameterSet]) -> Self { + self.inner.pps_std_count = pps_std.len() as _; + self.inner.p_pps_std = pps_std.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265SessionParametersAddInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265SessionParametersCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub max_sps_std_count: u32, + pub max_pps_std_count: u32, + pub p_parameters_add_info: *const VideoDecodeH265SessionParametersAddInfoEXT, +} +impl ::std::default::Default for VideoDecodeH265SessionParametersCreateInfoEXT { + fn default() -> VideoDecodeH265SessionParametersCreateInfoEXT { + VideoDecodeH265SessionParametersCreateInfoEXT { + s_type: StructureType::VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + max_sps_std_count: u32::default(), + max_pps_std_count: u32::default(), + p_parameters_add_info: ::std::ptr::null(), + } + } +} +impl VideoDecodeH265SessionParametersCreateInfoEXT { + pub fn builder<'a>() -> VideoDecodeH265SessionParametersCreateInfoEXTBuilder<'a> { + VideoDecodeH265SessionParametersCreateInfoEXTBuilder { + inner: VideoDecodeH265SessionParametersCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265SessionParametersCreateInfoEXTBuilder<'a> { + inner: VideoDecodeH265SessionParametersCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoDecodeH265SessionParametersCreateInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoDecodeH265SessionParametersCreateInfoEXT +{ +} +impl<'a> ::std::ops::Deref for VideoDecodeH265SessionParametersCreateInfoEXTBuilder<'a> { + type Target = VideoDecodeH265SessionParametersCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265SessionParametersCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265SessionParametersCreateInfoEXTBuilder<'a> { + pub fn max_sps_std_count(mut self, max_sps_std_count: u32) -> Self { + self.inner.max_sps_std_count = max_sps_std_count; + self + } + pub fn max_pps_std_count(mut self, max_pps_std_count: u32) -> Self { + self.inner.max_pps_std_count = max_pps_std_count; + self + } + pub fn parameters_add_info( + mut self, + parameters_add_info: &'a VideoDecodeH265SessionParametersAddInfoEXT, + ) -> Self { + self.inner.p_parameters_add_info = parameters_add_info; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265SessionParametersCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265PictureInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_std_picture_info: *mut StdVideoDecodeH265PictureInfo, + pub slices_count: u32, + pub p_slices_data_offsets: *const u32, +} +impl ::std::default::Default for VideoDecodeH265PictureInfoEXT { + fn default() -> VideoDecodeH265PictureInfoEXT { + VideoDecodeH265PictureInfoEXT { + s_type: StructureType::VIDEO_DECODE_H265_PICTURE_INFO_EXT, + p_next: ::std::ptr::null(), + p_std_picture_info: ::std::ptr::null_mut(), + slices_count: u32::default(), + p_slices_data_offsets: ::std::ptr::null(), + } + } +} +impl VideoDecodeH265PictureInfoEXT { + pub fn builder<'a>() -> VideoDecodeH265PictureInfoEXTBuilder<'a> { + VideoDecodeH265PictureInfoEXTBuilder { + inner: VideoDecodeH265PictureInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265PictureInfoEXTBuilder<'a> { + inner: VideoDecodeH265PictureInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoDecodeInfoKHR for VideoDecodeH265PictureInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoDecodeInfoKHR for VideoDecodeH265PictureInfoEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH265PictureInfoEXTBuilder<'a> { + type Target = VideoDecodeH265PictureInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265PictureInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265PictureInfoEXTBuilder<'a> { + pub fn std_picture_info( + mut self, + std_picture_info: &'a mut StdVideoDecodeH265PictureInfo, + ) -> Self { + self.inner.p_std_picture_info = std_picture_info; + self + } + pub fn slices_data_offsets(mut self, slices_data_offsets: &'a [u32]) -> Self { + self.inner.slices_count = slices_data_offsets.len() as _; + self.inner.p_slices_data_offsets = slices_data_offsets.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265PictureInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoDecodeH265DpbSlotInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_std_reference_info: *const StdVideoDecodeH265ReferenceInfo, +} +impl ::std::default::Default for VideoDecodeH265DpbSlotInfoEXT { + fn default() -> VideoDecodeH265DpbSlotInfoEXT { + VideoDecodeH265DpbSlotInfoEXT { + s_type: StructureType::VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT, + p_next: ::std::ptr::null(), + p_std_reference_info: ::std::ptr::null(), + } + } +} +impl VideoDecodeH265DpbSlotInfoEXT { + pub fn builder<'a>() -> VideoDecodeH265DpbSlotInfoEXTBuilder<'a> { + VideoDecodeH265DpbSlotInfoEXTBuilder { + inner: VideoDecodeH265DpbSlotInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoDecodeH265DpbSlotInfoEXTBuilder<'a> { + inner: VideoDecodeH265DpbSlotInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoReferenceSlotKHR for VideoDecodeH265DpbSlotInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoReferenceSlotKHR for VideoDecodeH265DpbSlotInfoEXT {} +impl<'a> ::std::ops::Deref for VideoDecodeH265DpbSlotInfoEXTBuilder<'a> { + type Target = VideoDecodeH265DpbSlotInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoDecodeH265DpbSlotInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoDecodeH265DpbSlotInfoEXTBuilder<'a> { + pub fn std_reference_info( + mut self, + std_reference_info: &'a StdVideoDecodeH265ReferenceInfo, + ) -> Self { + self.inner.p_std_reference_info = std_reference_info; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoDecodeH265DpbSlotInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoSessionCreateInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub queue_family_index: u32, + pub flags: VideoSessionCreateFlagsKHR, + pub p_video_profile: *const VideoProfileKHR, + pub picture_format: Format, + pub max_coded_extent: Extent2D, + pub reference_pictures_format: Format, + pub max_reference_pictures_slots_count: u32, + pub max_reference_pictures_active_count: u32, +} +impl ::std::default::Default for VideoSessionCreateInfoKHR { + fn default() -> VideoSessionCreateInfoKHR { + VideoSessionCreateInfoKHR { + s_type: StructureType::VIDEO_SESSION_CREATE_INFO_KHR, + p_next: ::std::ptr::null(), + queue_family_index: u32::default(), + flags: VideoSessionCreateFlagsKHR::default(), + p_video_profile: ::std::ptr::null(), + picture_format: Format::default(), + max_coded_extent: Extent2D::default(), + reference_pictures_format: Format::default(), + max_reference_pictures_slots_count: u32::default(), + max_reference_pictures_active_count: u32::default(), + } + } +} +impl VideoSessionCreateInfoKHR { + pub fn builder<'a>() -> VideoSessionCreateInfoKHRBuilder<'a> { + VideoSessionCreateInfoKHRBuilder { + inner: VideoSessionCreateInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoSessionCreateInfoKHRBuilder<'a> { + inner: VideoSessionCreateInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoSessionCreateInfoKHR {} +impl<'a> ::std::ops::Deref for VideoSessionCreateInfoKHRBuilder<'a> { + type Target = VideoSessionCreateInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoSessionCreateInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoSessionCreateInfoKHRBuilder<'a> { + pub fn queue_family_index(mut self, queue_family_index: u32) -> Self { + self.inner.queue_family_index = queue_family_index; + self + } + pub fn flags(mut self, flags: VideoSessionCreateFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + pub fn video_profile(mut self, video_profile: &'a VideoProfileKHR) -> Self { + self.inner.p_video_profile = video_profile; + self + } + pub fn picture_format(mut self, picture_format: Format) -> Self { + self.inner.picture_format = picture_format; + self + } + pub fn max_coded_extent(mut self, max_coded_extent: Extent2D) -> Self { + self.inner.max_coded_extent = max_coded_extent; + self + } + pub fn reference_pictures_format(mut self, reference_pictures_format: Format) -> Self { + self.inner.reference_pictures_format = reference_pictures_format; + self + } + pub fn max_reference_pictures_slots_count( + mut self, + max_reference_pictures_slots_count: u32, + ) -> Self { + self.inner.max_reference_pictures_slots_count = max_reference_pictures_slots_count; + self + } + pub fn max_reference_pictures_active_count( + mut self, + max_reference_pictures_active_count: u32, + ) -> Self { + self.inner.max_reference_pictures_active_count = max_reference_pictures_active_count; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoSessionCreateInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoSessionParametersCreateInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub video_session_parameters_template: VideoSessionParametersKHR, + pub video_session: VideoSessionKHR, +} +impl ::std::default::Default for VideoSessionParametersCreateInfoKHR { + fn default() -> VideoSessionParametersCreateInfoKHR { + VideoSessionParametersCreateInfoKHR { + s_type: StructureType::VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, + p_next: ::std::ptr::null(), + video_session_parameters_template: VideoSessionParametersKHR::default(), + video_session: VideoSessionKHR::default(), + } + } +} +impl VideoSessionParametersCreateInfoKHR { + pub fn builder<'a>() -> VideoSessionParametersCreateInfoKHRBuilder<'a> { + VideoSessionParametersCreateInfoKHRBuilder { + inner: VideoSessionParametersCreateInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoSessionParametersCreateInfoKHRBuilder<'a> { + inner: VideoSessionParametersCreateInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoSessionParametersCreateInfoKHR {} +impl<'a> ::std::ops::Deref for VideoSessionParametersCreateInfoKHRBuilder<'a> { + type Target = VideoSessionParametersCreateInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoSessionParametersCreateInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoSessionParametersCreateInfoKHRBuilder<'a> { + pub fn video_session_parameters_template( + mut self, + video_session_parameters_template: VideoSessionParametersKHR, + ) -> Self { + self.inner.video_session_parameters_template = video_session_parameters_template; + self + } + pub fn video_session(mut self, video_session: VideoSessionKHR) -> Self { + self.inner.video_session = video_session; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoSessionParametersCreateInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoSessionParametersUpdateInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub update_sequence_count: u32, +} +impl ::std::default::Default for VideoSessionParametersUpdateInfoKHR { + fn default() -> VideoSessionParametersUpdateInfoKHR { + VideoSessionParametersUpdateInfoKHR { + s_type: StructureType::VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR, + p_next: ::std::ptr::null(), + update_sequence_count: u32::default(), + } + } +} +impl VideoSessionParametersUpdateInfoKHR { + pub fn builder<'a>() -> VideoSessionParametersUpdateInfoKHRBuilder<'a> { + VideoSessionParametersUpdateInfoKHRBuilder { + inner: VideoSessionParametersUpdateInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoSessionParametersUpdateInfoKHRBuilder<'a> { + inner: VideoSessionParametersUpdateInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoSessionParametersUpdateInfoKHR {} +impl<'a> ::std::ops::Deref for VideoSessionParametersUpdateInfoKHRBuilder<'a> { + type Target = VideoSessionParametersUpdateInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoSessionParametersUpdateInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoSessionParametersUpdateInfoKHRBuilder<'a> { + pub fn update_sequence_count(mut self, update_sequence_count: u32) -> Self { + self.inner.update_sequence_count = update_sequence_count; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoSessionParametersUpdateInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoBeginCodingInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoBeginCodingFlagsKHR, + pub codec_quality_preset: VideoCodingQualityPresetFlagsKHR, + pub video_session: VideoSessionKHR, + pub video_session_parameters: VideoSessionParametersKHR, + pub reference_slot_count: u32, + pub p_reference_slots: *const VideoReferenceSlotKHR, +} +impl ::std::default::Default for VideoBeginCodingInfoKHR { + fn default() -> VideoBeginCodingInfoKHR { + VideoBeginCodingInfoKHR { + s_type: StructureType::VIDEO_BEGIN_CODING_INFO_KHR, + p_next: ::std::ptr::null(), + flags: VideoBeginCodingFlagsKHR::default(), + codec_quality_preset: VideoCodingQualityPresetFlagsKHR::default(), + video_session: VideoSessionKHR::default(), + video_session_parameters: VideoSessionParametersKHR::default(), + reference_slot_count: u32::default(), + p_reference_slots: ::std::ptr::null(), + } + } +} +impl VideoBeginCodingInfoKHR { + pub fn builder<'a>() -> VideoBeginCodingInfoKHRBuilder<'a> { + VideoBeginCodingInfoKHRBuilder { + inner: VideoBeginCodingInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoBeginCodingInfoKHRBuilder<'a> { + inner: VideoBeginCodingInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoBeginCodingInfoKHR {} +impl<'a> ::std::ops::Deref for VideoBeginCodingInfoKHRBuilder<'a> { + type Target = VideoBeginCodingInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoBeginCodingInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoBeginCodingInfoKHRBuilder<'a> { + pub fn flags(mut self, flags: VideoBeginCodingFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + pub fn codec_quality_preset( + mut self, + codec_quality_preset: VideoCodingQualityPresetFlagsKHR, + ) -> Self { + self.inner.codec_quality_preset = codec_quality_preset; + self + } + pub fn video_session(mut self, video_session: VideoSessionKHR) -> Self { + self.inner.video_session = video_session; + self + } + pub fn video_session_parameters( + mut self, + video_session_parameters: VideoSessionParametersKHR, + ) -> Self { + self.inner.video_session_parameters = video_session_parameters; + self + } + pub fn reference_slots(mut self, reference_slots: &'a [VideoReferenceSlotKHR]) -> Self { + self.inner.reference_slot_count = reference_slots.len() as _; + self.inner.p_reference_slots = reference_slots.as_ptr(); + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoBeginCodingInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEndCodingInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoEndCodingFlagsKHR, +} +impl ::std::default::Default for VideoEndCodingInfoKHR { + fn default() -> VideoEndCodingInfoKHR { + VideoEndCodingInfoKHR { + s_type: StructureType::VIDEO_END_CODING_INFO_KHR, + p_next: ::std::ptr::null(), + flags: VideoEndCodingFlagsKHR::default(), + } + } +} +impl VideoEndCodingInfoKHR { + pub fn builder<'a>() -> VideoEndCodingInfoKHRBuilder<'a> { + VideoEndCodingInfoKHRBuilder { + inner: VideoEndCodingInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEndCodingInfoKHRBuilder<'a> { + inner: VideoEndCodingInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoEndCodingInfoKHR {} +impl<'a> ::std::ops::Deref for VideoEndCodingInfoKHRBuilder<'a> { + type Target = VideoEndCodingInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEndCodingInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEndCodingInfoKHRBuilder<'a> { + pub fn flags(mut self, flags: VideoEndCodingFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEndCodingInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoCodingControlInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoCodingControlFlagsKHR, +} +impl ::std::default::Default for VideoCodingControlInfoKHR { + fn default() -> VideoCodingControlInfoKHR { + VideoCodingControlInfoKHR { + s_type: StructureType::VIDEO_CODING_CONTROL_INFO_KHR, + p_next: ::std::ptr::null(), + flags: VideoCodingControlFlagsKHR::default(), + } + } +} +impl VideoCodingControlInfoKHR { + pub fn builder<'a>() -> VideoCodingControlInfoKHRBuilder<'a> { + VideoCodingControlInfoKHRBuilder { + inner: VideoCodingControlInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoCodingControlInfoKHRBuilder<'a> { + inner: VideoCodingControlInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoCodingControlInfoKHR {} +impl<'a> ::std::ops::Deref for VideoCodingControlInfoKHRBuilder<'a> { + type Target = VideoCodingControlInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoCodingControlInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoCodingControlInfoKHRBuilder<'a> { + pub fn flags(mut self, flags: VideoCodingControlFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoCodingControlInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoEncodeFlagsKHR, + pub quality_level: u32, + pub coded_extent: Extent2D, + pub dst_bitstream_buffer: Buffer, + pub dst_bitstream_buffer_offset: DeviceSize, + pub dst_bitstream_buffer_max_range: DeviceSize, + pub src_picture_resource: VideoPictureResourceKHR, + pub p_setup_reference_slot: *const VideoReferenceSlotKHR, + pub reference_slot_count: u32, + pub p_reference_slots: *const VideoReferenceSlotKHR, +} +impl ::std::default::Default for VideoEncodeInfoKHR { + fn default() -> VideoEncodeInfoKHR { + VideoEncodeInfoKHR { + s_type: StructureType::VIDEO_ENCODE_INFO_KHR, + p_next: ::std::ptr::null(), + flags: VideoEncodeFlagsKHR::default(), + quality_level: u32::default(), + coded_extent: Extent2D::default(), + dst_bitstream_buffer: Buffer::default(), + dst_bitstream_buffer_offset: DeviceSize::default(), + dst_bitstream_buffer_max_range: DeviceSize::default(), + src_picture_resource: VideoPictureResourceKHR::default(), + p_setup_reference_slot: ::std::ptr::null(), + reference_slot_count: u32::default(), + p_reference_slots: ::std::ptr::null(), + } + } +} +impl VideoEncodeInfoKHR { + pub fn builder<'a>() -> VideoEncodeInfoKHRBuilder<'a> { + VideoEncodeInfoKHRBuilder { + inner: VideoEncodeInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeInfoKHRBuilder<'a> { + inner: VideoEncodeInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoEncodeInfoKHR {} +impl<'a> ::std::ops::Deref for VideoEncodeInfoKHRBuilder<'a> { + type Target = VideoEncodeInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeInfoKHRBuilder<'a> { + pub fn flags(mut self, flags: VideoEncodeFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + pub fn quality_level(mut self, quality_level: u32) -> Self { + self.inner.quality_level = quality_level; + self + } + pub fn coded_extent(mut self, coded_extent: Extent2D) -> Self { + self.inner.coded_extent = coded_extent; + self + } + pub fn dst_bitstream_buffer(mut self, dst_bitstream_buffer: Buffer) -> Self { + self.inner.dst_bitstream_buffer = dst_bitstream_buffer; + self + } + pub fn dst_bitstream_buffer_offset(mut self, dst_bitstream_buffer_offset: DeviceSize) -> Self { + self.inner.dst_bitstream_buffer_offset = dst_bitstream_buffer_offset; + self + } + pub fn dst_bitstream_buffer_max_range( + mut self, + dst_bitstream_buffer_max_range: DeviceSize, + ) -> Self { + self.inner.dst_bitstream_buffer_max_range = dst_bitstream_buffer_max_range; + self + } + pub fn src_picture_resource(mut self, src_picture_resource: VideoPictureResourceKHR) -> Self { + self.inner.src_picture_resource = src_picture_resource; + self + } + pub fn setup_reference_slot(mut self, setup_reference_slot: &'a VideoReferenceSlotKHR) -> Self { + self.inner.p_setup_reference_slot = setup_reference_slot; + self + } + pub fn reference_slots(mut self, reference_slots: &'a [VideoReferenceSlotKHR]) -> Self { + self.inner.reference_slot_count = reference_slots.len() as _; + self.inner.p_reference_slots = reference_slots.as_ptr(); + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeRateControlInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoEncodeRateControlFlagsKHR, + pub rate_control_mode: VideoEncodeRateControlModeFlagsKHR, + pub average_bitrate: u32, + pub peak_to_average_bitrate_ratio: u16, + pub frame_rate_numerator: u16, + pub frame_rate_denominator: u16, + pub virtual_buffer_size_in_ms: u32, +} +impl ::std::default::Default for VideoEncodeRateControlInfoKHR { + fn default() -> VideoEncodeRateControlInfoKHR { + VideoEncodeRateControlInfoKHR { + s_type: StructureType::VIDEO_ENCODE_RATE_CONTROL_INFO_KHR, + p_next: ::std::ptr::null(), + flags: VideoEncodeRateControlFlagsKHR::default(), + rate_control_mode: VideoEncodeRateControlModeFlagsKHR::default(), + average_bitrate: u32::default(), + peak_to_average_bitrate_ratio: u16::default(), + frame_rate_numerator: u16::default(), + frame_rate_denominator: u16::default(), + virtual_buffer_size_in_ms: u32::default(), + } + } +} +impl VideoEncodeRateControlInfoKHR { + pub fn builder<'a>() -> VideoEncodeRateControlInfoKHRBuilder<'a> { + VideoEncodeRateControlInfoKHRBuilder { + inner: VideoEncodeRateControlInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeRateControlInfoKHRBuilder<'a> { + inner: VideoEncodeRateControlInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoCodingControlInfoKHR for VideoEncodeRateControlInfoKHRBuilder<'_> {} +unsafe impl ExtendsVideoCodingControlInfoKHR for VideoEncodeRateControlInfoKHR {} +impl<'a> ::std::ops::Deref for VideoEncodeRateControlInfoKHRBuilder<'a> { + type Target = VideoEncodeRateControlInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeRateControlInfoKHRBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeRateControlInfoKHRBuilder<'a> { + pub fn flags(mut self, flags: VideoEncodeRateControlFlagsKHR) -> Self { + self.inner.flags = flags; + self + } + pub fn rate_control_mode( + mut self, + rate_control_mode: VideoEncodeRateControlModeFlagsKHR, + ) -> Self { + self.inner.rate_control_mode = rate_control_mode; + self + } + pub fn average_bitrate(mut self, average_bitrate: u32) -> Self { + self.inner.average_bitrate = average_bitrate; + self + } + pub fn peak_to_average_bitrate_ratio(mut self, peak_to_average_bitrate_ratio: u16) -> Self { + self.inner.peak_to_average_bitrate_ratio = peak_to_average_bitrate_ratio; + self + } + pub fn frame_rate_numerator(mut self, frame_rate_numerator: u16) -> Self { + self.inner.frame_rate_numerator = frame_rate_numerator; + self + } + pub fn frame_rate_denominator(mut self, frame_rate_denominator: u16) -> Self { + self.inner.frame_rate_denominator = frame_rate_denominator; + self + } + pub fn virtual_buffer_size_in_ms(mut self, virtual_buffer_size_in_ms: u32) -> Self { + self.inner.virtual_buffer_size_in_ms = virtual_buffer_size_in_ms; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeRateControlInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264CapabilitiesEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoEncodeH264CapabilitiesFlagsEXT, + pub input_mode_flags: VideoEncodeH264InputModeFlagsEXT, + pub output_mode_flags: VideoEncodeH264OutputModeFlagsEXT, + pub min_picture_size_in_mbs: Extent2D, + pub max_picture_size_in_mbs: Extent2D, + pub input_image_data_alignment: Extent2D, + pub max_num_l0_reference_for_p: u8, + pub max_num_l0_reference_for_b: u8, + pub max_num_l1_reference: u8, + pub quality_level_count: u8, + pub std_extension_version: ExtensionProperties, +} +impl ::std::default::Default for VideoEncodeH264CapabilitiesEXT { + fn default() -> VideoEncodeH264CapabilitiesEXT { + VideoEncodeH264CapabilitiesEXT { + s_type: StructureType::VIDEO_ENCODE_H264_CAPABILITIES_EXT, + p_next: ::std::ptr::null(), + flags: VideoEncodeH264CapabilitiesFlagsEXT::default(), + input_mode_flags: VideoEncodeH264InputModeFlagsEXT::default(), + output_mode_flags: VideoEncodeH264OutputModeFlagsEXT::default(), + min_picture_size_in_mbs: Extent2D::default(), + max_picture_size_in_mbs: Extent2D::default(), + input_image_data_alignment: Extent2D::default(), + max_num_l0_reference_for_p: u8::default(), + max_num_l0_reference_for_b: u8::default(), + max_num_l1_reference: u8::default(), + quality_level_count: u8::default(), + std_extension_version: ExtensionProperties::default(), + } + } +} +impl VideoEncodeH264CapabilitiesEXT { + pub fn builder<'a>() -> VideoEncodeH264CapabilitiesEXTBuilder<'a> { + VideoEncodeH264CapabilitiesEXTBuilder { + inner: VideoEncodeH264CapabilitiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264CapabilitiesEXTBuilder<'a> { + inner: VideoEncodeH264CapabilitiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoEncodeH264CapabilitiesEXTBuilder<'_> {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoEncodeH264CapabilitiesEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264CapabilitiesEXTBuilder<'a> { + type Target = VideoEncodeH264CapabilitiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264CapabilitiesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264CapabilitiesEXTBuilder<'a> { + pub fn flags(mut self, flags: VideoEncodeH264CapabilitiesFlagsEXT) -> Self { + self.inner.flags = flags; + self + } + pub fn input_mode_flags(mut self, input_mode_flags: VideoEncodeH264InputModeFlagsEXT) -> Self { + self.inner.input_mode_flags = input_mode_flags; + self + } + pub fn output_mode_flags( + mut self, + output_mode_flags: VideoEncodeH264OutputModeFlagsEXT, + ) -> Self { + self.inner.output_mode_flags = output_mode_flags; + self + } + pub fn min_picture_size_in_mbs(mut self, min_picture_size_in_mbs: Extent2D) -> Self { + self.inner.min_picture_size_in_mbs = min_picture_size_in_mbs; + self + } + pub fn max_picture_size_in_mbs(mut self, max_picture_size_in_mbs: Extent2D) -> Self { + self.inner.max_picture_size_in_mbs = max_picture_size_in_mbs; + self + } + pub fn input_image_data_alignment(mut self, input_image_data_alignment: Extent2D) -> Self { + self.inner.input_image_data_alignment = input_image_data_alignment; + self + } + pub fn max_num_l0_reference_for_p(mut self, max_num_l0_reference_for_p: u8) -> Self { + self.inner.max_num_l0_reference_for_p = max_num_l0_reference_for_p; + self + } + pub fn max_num_l0_reference_for_b(mut self, max_num_l0_reference_for_b: u8) -> Self { + self.inner.max_num_l0_reference_for_b = max_num_l0_reference_for_b; + self + } + pub fn max_num_l1_reference(mut self, max_num_l1_reference: u8) -> Self { + self.inner.max_num_l1_reference = max_num_l1_reference; + self + } + pub fn quality_level_count(mut self, quality_level_count: u8) -> Self { + self.inner.quality_level_count = quality_level_count; + self + } + pub fn std_extension_version(mut self, std_extension_version: ExtensionProperties) -> Self { + self.inner.std_extension_version = std_extension_version; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264CapabilitiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264SessionCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: VideoEncodeH264CreateFlagsEXT, + pub max_picture_size_in_mbs: Extent2D, + pub p_std_extension_version: *const ExtensionProperties, +} +impl ::std::default::Default for VideoEncodeH264SessionCreateInfoEXT { + fn default() -> VideoEncodeH264SessionCreateInfoEXT { + VideoEncodeH264SessionCreateInfoEXT { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + flags: VideoEncodeH264CreateFlagsEXT::default(), + max_picture_size_in_mbs: Extent2D::default(), + p_std_extension_version: ::std::ptr::null(), + } + } +} +impl VideoEncodeH264SessionCreateInfoEXT { + pub fn builder<'a>() -> VideoEncodeH264SessionCreateInfoEXTBuilder<'a> { + VideoEncodeH264SessionCreateInfoEXTBuilder { + inner: VideoEncodeH264SessionCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264SessionCreateInfoEXTBuilder<'a> { + inner: VideoEncodeH264SessionCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoEncodeH264SessionCreateInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoEncodeH264SessionCreateInfoEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264SessionCreateInfoEXTBuilder<'a> { + type Target = VideoEncodeH264SessionCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264SessionCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264SessionCreateInfoEXTBuilder<'a> { + pub fn flags(mut self, flags: VideoEncodeH264CreateFlagsEXT) -> Self { + self.inner.flags = flags; + self + } + pub fn max_picture_size_in_mbs(mut self, max_picture_size_in_mbs: Extent2D) -> Self { + self.inner.max_picture_size_in_mbs = max_picture_size_in_mbs; + self + } + pub fn std_extension_version(mut self, std_extension_version: &'a ExtensionProperties) -> Self { + self.inner.p_std_extension_version = std_extension_version; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264SessionCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264SessionParametersAddInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub sps_std_count: u32, + pub p_sps_std: *const StdVideoH264SequenceParameterSet, + pub pps_std_count: u32, + pub p_pps_std: *const StdVideoH264PictureParameterSet, +} +impl ::std::default::Default for VideoEncodeH264SessionParametersAddInfoEXT { + fn default() -> VideoEncodeH264SessionParametersAddInfoEXT { + VideoEncodeH264SessionParametersAddInfoEXT { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT, + p_next: ::std::ptr::null(), + sps_std_count: u32::default(), + p_sps_std: ::std::ptr::null(), + pps_std_count: u32::default(), + p_pps_std: ::std::ptr::null(), + } + } +} +impl VideoEncodeH264SessionParametersAddInfoEXT { + pub fn builder<'a>() -> VideoEncodeH264SessionParametersAddInfoEXTBuilder<'a> { + VideoEncodeH264SessionParametersAddInfoEXTBuilder { + inner: VideoEncodeH264SessionParametersAddInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264SessionParametersAddInfoEXTBuilder<'a> { + inner: VideoEncodeH264SessionParametersAddInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoEncodeH264SessionParametersAddInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoEncodeH264SessionParametersAddInfoEXT +{ +} +impl<'a> ::std::ops::Deref for VideoEncodeH264SessionParametersAddInfoEXTBuilder<'a> { + type Target = VideoEncodeH264SessionParametersAddInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264SessionParametersAddInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264SessionParametersAddInfoEXTBuilder<'a> { + pub fn sps_std(mut self, sps_std: &'a [StdVideoH264SequenceParameterSet]) -> Self { + self.inner.sps_std_count = sps_std.len() as _; + self.inner.p_sps_std = sps_std.as_ptr(); + self + } + pub fn pps_std(mut self, pps_std: &'a [StdVideoH264PictureParameterSet]) -> Self { + self.inner.pps_std_count = pps_std.len() as _; + self.inner.p_pps_std = pps_std.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264SessionParametersAddInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264SessionParametersCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub max_sps_std_count: u32, + pub max_pps_std_count: u32, + pub p_parameters_add_info: *const VideoEncodeH264SessionParametersAddInfoEXT, +} +impl ::std::default::Default for VideoEncodeH264SessionParametersCreateInfoEXT { + fn default() -> VideoEncodeH264SessionParametersCreateInfoEXT { + VideoEncodeH264SessionParametersCreateInfoEXT { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + max_sps_std_count: u32::default(), + max_pps_std_count: u32::default(), + p_parameters_add_info: ::std::ptr::null(), + } + } +} +impl VideoEncodeH264SessionParametersCreateInfoEXT { + pub fn builder<'a>() -> VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'a> { + VideoEncodeH264SessionParametersCreateInfoEXTBuilder { + inner: VideoEncodeH264SessionParametersCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'a> { + inner: VideoEncodeH264SessionParametersCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'_> +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoEncodeH264SessionParametersCreateInfoEXT +{ +} +impl<'a> ::std::ops::Deref for VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'a> { + type Target = VideoEncodeH264SessionParametersCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'a> { + pub fn max_sps_std_count(mut self, max_sps_std_count: u32) -> Self { + self.inner.max_sps_std_count = max_sps_std_count; + self + } + pub fn max_pps_std_count(mut self, max_pps_std_count: u32) -> Self { + self.inner.max_pps_std_count = max_pps_std_count; + self + } + pub fn parameters_add_info( + mut self, + parameters_add_info: &'a VideoEncodeH264SessionParametersAddInfoEXT, + ) -> Self { + self.inner.p_parameters_add_info = parameters_add_info; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264SessionParametersCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264DpbSlotInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub slot_index: i8, + pub p_std_picture_info: *const StdVideoEncodeH264PictureInfo, +} +impl ::std::default::Default for VideoEncodeH264DpbSlotInfoEXT { + fn default() -> VideoEncodeH264DpbSlotInfoEXT { + VideoEncodeH264DpbSlotInfoEXT { + s_type: StructureType::VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT, + p_next: ::std::ptr::null(), + slot_index: i8::default(), + p_std_picture_info: ::std::ptr::null(), + } + } +} +impl VideoEncodeH264DpbSlotInfoEXT { + pub fn builder<'a>() -> VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { + VideoEncodeH264DpbSlotInfoEXTBuilder { + inner: VideoEncodeH264DpbSlotInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { + inner: VideoEncodeH264DpbSlotInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoEncodeH264DpbSlotInfoEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { + type Target = VideoEncodeH264DpbSlotInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264DpbSlotInfoEXTBuilder<'a> { + pub fn slot_index(mut self, slot_index: i8) -> Self { + self.inner.slot_index = slot_index; + self + } + pub fn std_picture_info(mut self, std_picture_info: &'a StdVideoEncodeH264PictureInfo) -> Self { + self.inner.p_std_picture_info = std_picture_info; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264DpbSlotInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264VclFrameInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub ref_default_final_list0_entry_count: u8, + pub p_ref_default_final_list0_entries: *const VideoEncodeH264DpbSlotInfoEXT, + pub ref_default_final_list1_entry_count: u8, + pub p_ref_default_final_list1_entries: *const VideoEncodeH264DpbSlotInfoEXT, + pub nalu_slice_entry_count: u32, + pub p_nalu_slice_entries: *const VideoEncodeH264NaluSliceEXT, + pub p_current_picture_info: *const VideoEncodeH264DpbSlotInfoEXT, +} +impl ::std::default::Default for VideoEncodeH264VclFrameInfoEXT { + fn default() -> VideoEncodeH264VclFrameInfoEXT { + VideoEncodeH264VclFrameInfoEXT { + s_type: StructureType::VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT, + p_next: ::std::ptr::null(), + ref_default_final_list0_entry_count: u8::default(), + p_ref_default_final_list0_entries: ::std::ptr::null(), + ref_default_final_list1_entry_count: u8::default(), + p_ref_default_final_list1_entries: ::std::ptr::null(), + nalu_slice_entry_count: u32::default(), + p_nalu_slice_entries: ::std::ptr::null(), + p_current_picture_info: ::std::ptr::null(), + } + } +} +impl VideoEncodeH264VclFrameInfoEXT { + pub fn builder<'a>() -> VideoEncodeH264VclFrameInfoEXTBuilder<'a> { + VideoEncodeH264VclFrameInfoEXTBuilder { + inner: VideoEncodeH264VclFrameInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264VclFrameInfoEXTBuilder<'a> { + inner: VideoEncodeH264VclFrameInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264VclFrameInfoEXTBuilder<'_> {} +unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264VclFrameInfoEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264VclFrameInfoEXTBuilder<'a> { + type Target = VideoEncodeH264VclFrameInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264VclFrameInfoEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264VclFrameInfoEXTBuilder<'a> { + pub fn ref_default_final_list0_entries( + mut self, + ref_default_final_list0_entries: &'a [VideoEncodeH264DpbSlotInfoEXT], + ) -> Self { + self.inner.ref_default_final_list0_entry_count = ref_default_final_list0_entries.len() as _; + self.inner.p_ref_default_final_list0_entries = ref_default_final_list0_entries.as_ptr(); + self + } + pub fn ref_default_final_list1_entries( + mut self, + ref_default_final_list1_entries: &'a [VideoEncodeH264DpbSlotInfoEXT], + ) -> Self { + self.inner.ref_default_final_list1_entry_count = ref_default_final_list1_entries.len() as _; + self.inner.p_ref_default_final_list1_entries = ref_default_final_list1_entries.as_ptr(); + self + } + pub fn nalu_slice_entries( + mut self, + nalu_slice_entries: &'a [VideoEncodeH264NaluSliceEXT], + ) -> Self { + self.inner.nalu_slice_entry_count = nalu_slice_entries.len() as _; + self.inner.p_nalu_slice_entries = nalu_slice_entries.as_ptr(); + self + } + pub fn current_picture_info( + mut self, + current_picture_info: &'a VideoEncodeH264DpbSlotInfoEXT, + ) -> Self { + self.inner.p_current_picture_info = current_picture_info; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264VclFrameInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264EmitPictureParametersEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub sps_id: u8, + pub emit_sps_enable: Bool32, + pub pps_id_entry_count: u32, + pub pps_id_entries: *const u8, +} +impl ::std::default::Default for VideoEncodeH264EmitPictureParametersEXT { + fn default() -> VideoEncodeH264EmitPictureParametersEXT { + VideoEncodeH264EmitPictureParametersEXT { + s_type: StructureType::VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT, + p_next: ::std::ptr::null(), + sps_id: u8::default(), + emit_sps_enable: Bool32::default(), + pps_id_entry_count: u32::default(), + pps_id_entries: ::std::ptr::null(), + } + } +} +impl VideoEncodeH264EmitPictureParametersEXT { + pub fn builder<'a>() -> VideoEncodeH264EmitPictureParametersEXTBuilder<'a> { + VideoEncodeH264EmitPictureParametersEXTBuilder { + inner: VideoEncodeH264EmitPictureParametersEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264EmitPictureParametersEXTBuilder<'a> { + inner: VideoEncodeH264EmitPictureParametersEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264EmitPictureParametersEXTBuilder<'_> {} +unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264EmitPictureParametersEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264EmitPictureParametersEXTBuilder<'a> { + type Target = VideoEncodeH264EmitPictureParametersEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264EmitPictureParametersEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264EmitPictureParametersEXTBuilder<'a> { + pub fn sps_id(mut self, sps_id: u8) -> Self { + self.inner.sps_id = sps_id; + self + } + pub fn emit_sps_enable(mut self, emit_sps_enable: bool) -> Self { + self.inner.emit_sps_enable = emit_sps_enable.into(); + self + } + pub fn pps_id_entries(mut self, pps_id_entries: &'a [u8]) -> Self { + self.inner.pps_id_entry_count = pps_id_entries.len() as _; + self.inner.pps_id_entries = pps_id_entries.as_ptr(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264EmitPictureParametersEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264ProfileEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub std_profile_idc: StdVideoH264ProfileIdc, +} +impl ::std::default::Default for VideoEncodeH264ProfileEXT { + fn default() -> VideoEncodeH264ProfileEXT { + VideoEncodeH264ProfileEXT { + s_type: StructureType::VIDEO_ENCODE_H264_PROFILE_EXT, + p_next: ::std::ptr::null(), + std_profile_idc: StdVideoH264ProfileIdc::default(), + } + } +} +impl VideoEncodeH264ProfileEXT { + pub fn builder<'a>() -> VideoEncodeH264ProfileEXTBuilder<'a> { + VideoEncodeH264ProfileEXTBuilder { + inner: VideoEncodeH264ProfileEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264ProfileEXTBuilder<'a> { + inner: VideoEncodeH264ProfileEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoEncodeH264ProfileEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264ProfileEXTBuilder<'a> { + type Target = VideoEncodeH264ProfileEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264ProfileEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264ProfileEXTBuilder<'a> { + pub fn std_profile_idc(mut self, std_profile_idc: StdVideoH264ProfileIdc) -> Self { + self.inner.std_profile_idc = std_profile_idc; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264ProfileEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct VideoEncodeH264NaluSliceEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_slice_header_std: *const StdVideoEncodeH264SliceHeader, + pub mb_count: u32, + pub ref_final_list0_entry_count: u8, + pub p_ref_final_list0_entries: *const VideoEncodeH264DpbSlotInfoEXT, + pub ref_final_list1_entry_count: u8, + pub p_ref_final_list1_entries: *const VideoEncodeH264DpbSlotInfoEXT, + pub preceding_nalu_bytes: u32, + pub min_qp: u8, + pub max_qp: u8, +} +impl ::std::default::Default for VideoEncodeH264NaluSliceEXT { + fn default() -> VideoEncodeH264NaluSliceEXT { + VideoEncodeH264NaluSliceEXT { + s_type: StructureType::VIDEO_ENCODE_H264_NALU_SLICE_EXT, + p_next: ::std::ptr::null(), + p_slice_header_std: ::std::ptr::null(), + mb_count: u32::default(), + ref_final_list0_entry_count: u8::default(), + p_ref_final_list0_entries: ::std::ptr::null(), + ref_final_list1_entry_count: u8::default(), + p_ref_final_list1_entries: ::std::ptr::null(), + preceding_nalu_bytes: u32::default(), + min_qp: u8::default(), + max_qp: u8::default(), + } + } +} +impl VideoEncodeH264NaluSliceEXT { + pub fn builder<'a>() -> VideoEncodeH264NaluSliceEXTBuilder<'a> { + VideoEncodeH264NaluSliceEXTBuilder { + inner: VideoEncodeH264NaluSliceEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct VideoEncodeH264NaluSliceEXTBuilder<'a> { + inner: VideoEncodeH264NaluSliceEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsVideoEncodeH264NaluSliceEXT {} +impl<'a> ::std::ops::Deref for VideoEncodeH264NaluSliceEXTBuilder<'a> { + type Target = VideoEncodeH264NaluSliceEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for VideoEncodeH264NaluSliceEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> VideoEncodeH264NaluSliceEXTBuilder<'a> { + pub fn slice_header_std(mut self, slice_header_std: &'a StdVideoEncodeH264SliceHeader) -> Self { + self.inner.p_slice_header_std = slice_header_std; + self + } + pub fn mb_count(mut self, mb_count: u32) -> Self { + self.inner.mb_count = mb_count; + self + } + pub fn ref_final_list0_entries( + mut self, + ref_final_list0_entries: &'a [VideoEncodeH264DpbSlotInfoEXT], + ) -> Self { + self.inner.ref_final_list0_entry_count = ref_final_list0_entries.len() as _; + self.inner.p_ref_final_list0_entries = ref_final_list0_entries.as_ptr(); + self + } + pub fn ref_final_list1_entries( + mut self, + ref_final_list1_entries: &'a [VideoEncodeH264DpbSlotInfoEXT], + ) -> Self { + self.inner.ref_final_list1_entry_count = ref_final_list1_entries.len() as _; + self.inner.p_ref_final_list1_entries = ref_final_list1_entries.as_ptr(); + self + } + pub fn preceding_nalu_bytes(mut self, preceding_nalu_bytes: u32) -> Self { + self.inner.preceding_nalu_bytes = preceding_nalu_bytes; + self + } + pub fn min_qp(mut self, min_qp: u8) -> Self { + self.inner.min_qp = min_qp; + self + } + pub fn max_qp(mut self, max_qp: u8) -> Self { + self.inner.max_qp = max_qp; + self + } + #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] + #[doc = r" method only exists on structs that can be passed to a function directly. Only"] + #[doc = r" valid extension structs can be pushed into the chain."] + #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] + #[doc = r" chain will look like `A -> D -> B -> C`."] + pub fn push_next(mut self, next: &'a mut T) -> Self { + unsafe { + let next_ptr = next as *mut T as *mut BaseOutStructure; + let last_next = ptr_chain_iter(next).last().unwrap(); + (*last_next).p_next = self.inner.p_next as _; + self.inner.p_next = next_ptr as _; + } + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> VideoEncodeH264NaluSliceEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceInheritedViewportScissorFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub inherited_viewport_scissor2_d: Bool32, +} +impl ::std::default::Default for PhysicalDeviceInheritedViewportScissorFeaturesNV { + fn default() -> PhysicalDeviceInheritedViewportScissorFeaturesNV { + PhysicalDeviceInheritedViewportScissorFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + inherited_viewport_scissor2_d: Bool32::default(), + } + } +} +impl PhysicalDeviceInheritedViewportScissorFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder<'a> { + PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder { + inner: PhysicalDeviceInheritedViewportScissorFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder<'a> { + inner: PhysicalDeviceInheritedViewportScissorFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsDeviceCreateInfo + for PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder<'_> +{ +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceInheritedViewportScissorFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceInheritedViewportScissorFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceInheritedViewportScissorFeaturesNVBuilder<'a> { + pub fn inherited_viewport_scissor2_d(mut self, inherited_viewport_scissor2_d: bool) -> Self { + self.inner.inherited_viewport_scissor2_d = inherited_viewport_scissor2_d.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceInheritedViewportScissorFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct CommandBufferInheritanceViewportScissorInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub viewport_scissor2_d: Bool32, + pub viewport_depth_count: u32, + pub p_viewport_depths: *const Viewport, +} +impl ::std::default::Default for CommandBufferInheritanceViewportScissorInfoNV { + fn default() -> CommandBufferInheritanceViewportScissorInfoNV { + CommandBufferInheritanceViewportScissorInfoNV { + s_type: StructureType::COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV, + p_next: ::std::ptr::null(), + viewport_scissor2_d: Bool32::default(), + viewport_depth_count: u32::default(), + p_viewport_depths: ::std::ptr::null(), + } + } +} +impl CommandBufferInheritanceViewportScissorInfoNV { + pub fn builder<'a>() -> CommandBufferInheritanceViewportScissorInfoNVBuilder<'a> { + CommandBufferInheritanceViewportScissorInfoNVBuilder { + inner: CommandBufferInheritanceViewportScissorInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct CommandBufferInheritanceViewportScissorInfoNVBuilder<'a> { + inner: CommandBufferInheritanceViewportScissorInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsCommandBufferInheritanceInfo + for CommandBufferInheritanceViewportScissorInfoNVBuilder<'_> +{ +} +unsafe impl ExtendsCommandBufferInheritanceInfo for CommandBufferInheritanceViewportScissorInfoNV {} +impl<'a> ::std::ops::Deref for CommandBufferInheritanceViewportScissorInfoNVBuilder<'a> { + type Target = CommandBufferInheritanceViewportScissorInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for CommandBufferInheritanceViewportScissorInfoNVBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> CommandBufferInheritanceViewportScissorInfoNVBuilder<'a> { + pub fn viewport_scissor2_d(mut self, viewport_scissor2_d: bool) -> Self { + self.inner.viewport_scissor2_d = viewport_scissor2_d.into(); + self + } + pub fn viewport_depth_count(mut self, viewport_depth_count: u32) -> Self { + self.inner.viewport_depth_count = viewport_depth_count; + self + } + pub fn viewport_depths(mut self, viewport_depths: &'a Viewport) -> Self { + self.inner.p_viewport_depths = viewport_depths; + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> CommandBufferInheritanceViewportScissorInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = ""] +pub struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub ycbcr2plane444_formats: Bool32, +} +impl ::std::default::Default for PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + fn default() -> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + ycbcr2plane444_formats: Bool32::default(), + } + } +} +impl PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder<'a> { + PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder { + inner: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +#[repr(transparent)] +pub struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder<'_> {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ::std::ops::DerefMut for PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder<'a> { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.inner + } +} +impl<'a> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXTBuilder<'a> { + pub fn ycbcr2plane444_formats(mut self, ycbcr2plane444_formats: bool) -> Self { + self.inner.ycbcr2plane444_formats = ycbcr2plane444_formats.into(); + self + } + #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] + #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] + #[doc = r" so references to builders can be passed directly to Vulkan functions."] + pub fn build(self) -> PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + self.inner + } +} diff --git a/ash/src/vk/enums.rs b/ash/src/vk/enums.rs index 3ec0991..0a466b0 100644 --- a/ash/src/vk/enums.rs +++ b/ash/src/vk/enums.rs @@ -1650,6 +1650,8 @@ impl DriverId { pub const MESA_LLVMPIPE: Self = Self(13); #[doc = "MoltenVK"] pub const MOLTENVK: Self = Self(14); + #[doc = "Core Avionics & Industrial Inc."] + pub const COREAVI_PROPRIETARY: Self = Self(15); } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] @@ -2186,3 +2188,20 @@ impl FragmentShadingRateTypeNV { pub const FRAGMENT_SIZE: Self = Self(0); pub const ENUMS: Self = Self(1); } +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +#[doc = ""] +pub struct QueryResultStatusKHR(pub(crate) i32); +impl QueryResultStatusKHR { + pub const fn from_raw(x: i32) -> Self { + QueryResultStatusKHR(x) + } + pub const fn as_raw(self) -> i32 { + self.0 + } +} +impl QueryResultStatusKHR { + pub const ERROR: Self = Self(-1); + pub const NOT_READY: Self = Self(0); + pub const COMPLETE: Self = Self(1); +} diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index 6f4970c..75643f7 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -2393,139 +2393,807 @@ impl StructureType { impl StructureType { pub const DEBUG_MARKER_MARKER_INFO_EXT: Self = Self(1_000_022_002); } -impl AmdExtension24Fn { +impl KhrVideoQueueFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_24\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_video_queue\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR = unsafe extern "system" fn( + physical_device: PhysicalDevice, + p_video_profile: *const VideoProfileKHR, + p_capabilities: *mut VideoCapabilitiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR = unsafe extern "system" fn( + physical_device: PhysicalDevice, + p_video_format_info: *const PhysicalDeviceVideoFormatInfoKHR, + p_video_format_property_count: *mut u32, + p_video_format_properties: *mut VideoFormatPropertiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateVideoSessionKHR = unsafe extern "system" fn( + device: Device, + p_create_info: *const VideoSessionCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_video_session: *mut VideoSessionKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyVideoSessionKHR = unsafe extern "system" fn( + device: Device, + video_session: VideoSessionKHR, + p_allocator: *const AllocationCallbacks, +); +#[allow(non_camel_case_types)] +pub type PFN_vkGetVideoSessionMemoryRequirementsKHR = unsafe extern "system" fn( + device: Device, + video_session: VideoSessionKHR, + p_video_session_memory_requirements_count: *mut u32, + p_video_session_memory_requirements: *mut VideoGetMemoryPropertiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkBindVideoSessionMemoryKHR = unsafe extern "system" fn( + device: Device, + video_session: VideoSessionKHR, + video_session_bind_memory_count: u32, + p_video_session_bind_memories: *const VideoBindMemoryKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateVideoSessionParametersKHR = unsafe extern "system" fn( + device: Device, + p_create_info: *const VideoSessionParametersCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_video_session_parameters: *mut VideoSessionParametersKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkUpdateVideoSessionParametersKHR = unsafe extern "system" fn( + device: Device, + video_session_parameters: VideoSessionParametersKHR, + p_update_info: *const VideoSessionParametersUpdateInfoKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyVideoSessionParametersKHR = unsafe extern "system" fn( + device: Device, + video_session_parameters: VideoSessionParametersKHR, + p_allocator: *const AllocationCallbacks, +); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBeginVideoCodingKHR = unsafe extern "system" fn( + command_buffer: CommandBuffer, + p_begin_info: *const VideoBeginCodingInfoKHR, +); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdEndVideoCodingKHR = unsafe extern "system" fn( + command_buffer: CommandBuffer, + p_end_coding_info: *const VideoEndCodingInfoKHR, +); +#[allow(non_camel_case_types)] +pub type PFN_vkCmdControlVideoCodingKHR = unsafe extern "system" fn( + command_buffer: CommandBuffer, + p_coding_control_info: *const VideoCodingControlInfoKHR, +); #[derive(Clone)] -pub struct AmdExtension24Fn {} -unsafe impl Send for AmdExtension24Fn {} -unsafe impl Sync for AmdExtension24Fn {} -impl AmdExtension24Fn { +pub struct KhrVideoQueueFn { + pub get_physical_device_video_capabilities_khr: PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR, + pub get_physical_device_video_format_properties_khr: + PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR, + pub create_video_session_khr: PFN_vkCreateVideoSessionKHR, + pub destroy_video_session_khr: PFN_vkDestroyVideoSessionKHR, + pub get_video_session_memory_requirements_khr: PFN_vkGetVideoSessionMemoryRequirementsKHR, + pub bind_video_session_memory_khr: PFN_vkBindVideoSessionMemoryKHR, + pub create_video_session_parameters_khr: PFN_vkCreateVideoSessionParametersKHR, + pub update_video_session_parameters_khr: PFN_vkUpdateVideoSessionParametersKHR, + pub destroy_video_session_parameters_khr: PFN_vkDestroyVideoSessionParametersKHR, + pub cmd_begin_video_coding_khr: PFN_vkCmdBeginVideoCodingKHR, + pub cmd_end_video_coding_khr: PFN_vkCmdEndVideoCodingKHR, + pub cmd_control_video_coding_khr: PFN_vkCmdControlVideoCodingKHR, +} +unsafe impl Send for KhrVideoQueueFn {} +unsafe impl Sync for KhrVideoQueueFn {} +impl KhrVideoQueueFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension24Fn {} + KhrVideoQueueFn { + get_physical_device_video_capabilities_khr: unsafe { + unsafe extern "system" fn get_physical_device_video_capabilities_khr( + _physical_device: PhysicalDevice, + _p_video_profile: *const VideoProfileKHR, + _p_capabilities: *mut VideoCapabilitiesKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_video_capabilities_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceVideoCapabilitiesKHR\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_video_capabilities_khr + } else { + ::std::mem::transmute(val) + } + }, + get_physical_device_video_format_properties_khr: unsafe { + unsafe extern "system" fn get_physical_device_video_format_properties_khr( + _physical_device: PhysicalDevice, + _p_video_format_info: *const PhysicalDeviceVideoFormatInfoKHR, + _p_video_format_property_count: *mut u32, + _p_video_format_properties: *mut VideoFormatPropertiesKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_video_format_properties_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetPhysicalDeviceVideoFormatPropertiesKHR\0", + ); + let val = _f(cname); + if val.is_null() { + get_physical_device_video_format_properties_khr + } else { + ::std::mem::transmute(val) + } + }, + create_video_session_khr: unsafe { + unsafe extern "system" fn create_video_session_khr( + _device: Device, + _p_create_info: *const VideoSessionCreateInfoKHR, + _p_allocator: *const AllocationCallbacks, + _p_video_session: *mut VideoSessionKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_video_session_khr) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCreateVideoSessionKHR\0"); + let val = _f(cname); + if val.is_null() { + create_video_session_khr + } else { + ::std::mem::transmute(val) + } + }, + destroy_video_session_khr: unsafe { + unsafe extern "system" fn destroy_video_session_khr( + _device: Device, + _video_session: VideoSessionKHR, + _p_allocator: *const AllocationCallbacks, + ) { + panic!(concat!( + "Unable to load ", + stringify!(destroy_video_session_khr) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkDestroyVideoSessionKHR\0"); + let val = _f(cname); + if val.is_null() { + destroy_video_session_khr + } else { + ::std::mem::transmute(val) + } + }, + get_video_session_memory_requirements_khr: unsafe { + unsafe extern "system" fn get_video_session_memory_requirements_khr( + _device: Device, + _video_session: VideoSessionKHR, + _p_video_session_memory_requirements_count: *mut u32, + _p_video_session_memory_requirements: *mut VideoGetMemoryPropertiesKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_video_session_memory_requirements_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkGetVideoSessionMemoryRequirementsKHR\0", + ); + let val = _f(cname); + if val.is_null() { + get_video_session_memory_requirements_khr + } else { + ::std::mem::transmute(val) + } + }, + bind_video_session_memory_khr: unsafe { + unsafe extern "system" fn bind_video_session_memory_khr( + _device: Device, + _video_session: VideoSessionKHR, + _video_session_bind_memory_count: u32, + _p_video_session_bind_memories: *const VideoBindMemoryKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(bind_video_session_memory_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkBindVideoSessionMemoryKHR\0", + ); + let val = _f(cname); + if val.is_null() { + bind_video_session_memory_khr + } else { + ::std::mem::transmute(val) + } + }, + create_video_session_parameters_khr: unsafe { + unsafe extern "system" fn create_video_session_parameters_khr( + _device: Device, + _p_create_info: *const VideoSessionParametersCreateInfoKHR, + _p_allocator: *const AllocationCallbacks, + _p_video_session_parameters: *mut VideoSessionParametersKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_video_session_parameters_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCreateVideoSessionParametersKHR\0", + ); + let val = _f(cname); + if val.is_null() { + create_video_session_parameters_khr + } else { + ::std::mem::transmute(val) + } + }, + update_video_session_parameters_khr: unsafe { + unsafe extern "system" fn update_video_session_parameters_khr( + _device: Device, + _video_session_parameters: VideoSessionParametersKHR, + _p_update_info: *const VideoSessionParametersUpdateInfoKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(update_video_session_parameters_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkUpdateVideoSessionParametersKHR\0", + ); + let val = _f(cname); + if val.is_null() { + update_video_session_parameters_khr + } else { + ::std::mem::transmute(val) + } + }, + destroy_video_session_parameters_khr: unsafe { + unsafe extern "system" fn destroy_video_session_parameters_khr( + _device: Device, + _video_session_parameters: VideoSessionParametersKHR, + _p_allocator: *const AllocationCallbacks, + ) { + panic!(concat!( + "Unable to load ", + stringify!(destroy_video_session_parameters_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkDestroyVideoSessionParametersKHR\0", + ); + let val = _f(cname); + if val.is_null() { + destroy_video_session_parameters_khr + } else { + ::std::mem::transmute(val) + } + }, + cmd_begin_video_coding_khr: unsafe { + unsafe extern "system" fn cmd_begin_video_coding_khr( + _command_buffer: CommandBuffer, + _p_begin_info: *const VideoBeginCodingInfoKHR, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_begin_video_coding_khr) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdBeginVideoCodingKHR\0"); + let val = _f(cname); + if val.is_null() { + cmd_begin_video_coding_khr + } else { + ::std::mem::transmute(val) + } + }, + cmd_end_video_coding_khr: unsafe { + unsafe extern "system" fn cmd_end_video_coding_khr( + _command_buffer: CommandBuffer, + _p_end_coding_info: *const VideoEndCodingInfoKHR, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_end_video_coding_khr) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdEndVideoCodingKHR\0"); + let val = _f(cname); + if val.is_null() { + cmd_end_video_coding_khr + } else { + ::std::mem::transmute(val) + } + }, + cmd_control_video_coding_khr: unsafe { + unsafe extern "system" fn cmd_control_video_coding_khr( + _command_buffer: CommandBuffer, + _p_coding_control_info: *const VideoCodingControlInfoKHR, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_control_video_coding_khr) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdControlVideoCodingKHR\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_control_video_coding_khr + } else { + ::std::mem::transmute(val) + } + }, + } + } + #[doc = ""] + pub unsafe fn get_physical_device_video_capabilities_khr( + &self, + physical_device: PhysicalDevice, + p_video_profile: *const VideoProfileKHR, + p_capabilities: *mut VideoCapabilitiesKHR, + ) -> Result { + (self.get_physical_device_video_capabilities_khr)( + physical_device, + p_video_profile, + p_capabilities, + ) + } + #[doc = ""] + pub unsafe fn get_physical_device_video_format_properties_khr( + &self, + physical_device: PhysicalDevice, + p_video_format_info: *const PhysicalDeviceVideoFormatInfoKHR, + p_video_format_property_count: *mut u32, + p_video_format_properties: *mut VideoFormatPropertiesKHR, + ) -> Result { + (self.get_physical_device_video_format_properties_khr)( + physical_device, + p_video_format_info, + p_video_format_property_count, + p_video_format_properties, + ) + } + #[doc = ""] + pub unsafe fn create_video_session_khr( + &self, + device: Device, + p_create_info: *const VideoSessionCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_video_session: *mut VideoSessionKHR, + ) -> Result { + (self.create_video_session_khr)(device, p_create_info, p_allocator, p_video_session) + } + #[doc = ""] + pub unsafe fn destroy_video_session_khr( + &self, + device: Device, + video_session: VideoSessionKHR, + p_allocator: *const AllocationCallbacks, + ) { + (self.destroy_video_session_khr)(device, video_session, p_allocator) + } + #[doc = ""] + pub unsafe fn get_video_session_memory_requirements_khr( + &self, + device: Device, + video_session: VideoSessionKHR, + p_video_session_memory_requirements_count: *mut u32, + p_video_session_memory_requirements: *mut VideoGetMemoryPropertiesKHR, + ) -> Result { + (self.get_video_session_memory_requirements_khr)( + device, + video_session, + p_video_session_memory_requirements_count, + p_video_session_memory_requirements, + ) + } + #[doc = ""] + pub unsafe fn bind_video_session_memory_khr( + &self, + device: Device, + video_session: VideoSessionKHR, + video_session_bind_memory_count: u32, + p_video_session_bind_memories: *const VideoBindMemoryKHR, + ) -> Result { + (self.bind_video_session_memory_khr)( + device, + video_session, + video_session_bind_memory_count, + p_video_session_bind_memories, + ) + } + #[doc = ""] + pub unsafe fn create_video_session_parameters_khr( + &self, + device: Device, + p_create_info: *const VideoSessionParametersCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_video_session_parameters: *mut VideoSessionParametersKHR, + ) -> Result { + (self.create_video_session_parameters_khr)( + device, + p_create_info, + p_allocator, + p_video_session_parameters, + ) + } + #[doc = ""] + pub unsafe fn update_video_session_parameters_khr( + &self, + device: Device, + video_session_parameters: VideoSessionParametersKHR, + p_update_info: *const VideoSessionParametersUpdateInfoKHR, + ) -> Result { + (self.update_video_session_parameters_khr)(device, video_session_parameters, p_update_info) + } + #[doc = ""] + pub unsafe fn destroy_video_session_parameters_khr( + &self, + device: Device, + video_session_parameters: VideoSessionParametersKHR, + p_allocator: *const AllocationCallbacks, + ) { + (self.destroy_video_session_parameters_khr)(device, video_session_parameters, p_allocator) + } + #[doc = ""] + pub unsafe fn cmd_begin_video_coding_khr( + &self, + command_buffer: CommandBuffer, + p_begin_info: *const VideoBeginCodingInfoKHR, + ) { + (self.cmd_begin_video_coding_khr)(command_buffer, p_begin_info) + } + #[doc = ""] + pub unsafe fn cmd_end_video_coding_khr( + &self, + command_buffer: CommandBuffer, + p_end_coding_info: *const VideoEndCodingInfoKHR, + ) { + (self.cmd_end_video_coding_khr)(command_buffer, p_end_coding_info) + } + #[doc = ""] + pub unsafe fn cmd_control_video_coding_khr( + &self, + command_buffer: CommandBuffer, + p_coding_control_info: *const VideoCodingControlInfoKHR, + ) { + (self.cmd_control_video_coding_khr)(command_buffer, p_coding_control_info) } } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl QueueFlags { - pub const RESERVED_6_KHR: Self = Self(0b100_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_PROFILE_KHR: Self = Self(1_000_023_000); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl PipelineStageFlags2KHR { - pub const RESERVED_26: Self = Self(0b100_0000_0000_0000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_CAPABILITIES_KHR: Self = Self(1_000_023_001); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl AccessFlags2KHR { - pub const RESERVED_READ_35: Self = Self(0b1000_0000_0000_0000_0000_0000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_PICTURE_RESOURCE_KHR: Self = Self(1_000_023_002); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl AccessFlags2KHR { - pub const RESERVED_WRITE_36: Self = Self(0b1_0000_0000_0000_0000_0000_0000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_GET_MEMORY_PROPERTIES_KHR: Self = Self(1_000_023_003); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl BufferUsageFlags { - pub const RESERVED_15_KHR: Self = Self(0b1000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_BIND_MEMORY_KHR: Self = Self(1_000_023_004); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl BufferUsageFlags { - pub const RESERVED_16_KHR: Self = Self(0b1_0000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_SESSION_CREATE_INFO_KHR: Self = Self(1_000_023_005); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl ImageUsageFlags { - pub const RESERVED_13_KHR: Self = Self(0b10_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR: Self = Self(1_000_023_006); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl ImageUsageFlags { - pub const RESERVED_14_KHR: Self = Self(0b100_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR: Self = Self(1_000_023_007); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl ImageUsageFlags { - pub const RESERVED_15_KHR: Self = Self(0b1000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_BEGIN_CODING_INFO_KHR: Self = Self(1_000_023_008); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl FormatFeatureFlags { - pub const RESERVED_27_KHR: Self = Self(0b1000_0000_0000_0000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_END_CODING_INFO_KHR: Self = Self(1_000_023_009); } -#[doc = "Generated from 'VK_AMD_extension_24'"] -impl FormatFeatureFlags { - pub const RESERVED_28_KHR: Self = Self(0b1_0000_0000_0000_0000_0000_0000_0000); +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_CODING_CONTROL_INFO_KHR: Self = Self(1_000_023_010); } -#[doc = "Generated from 'VK_AMD_extension_24'"] +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_REFERENCE_SLOT_KHR: Self = Self(1_000_023_011); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR: Self = Self(1_000_023_012); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_PROFILES_KHR: Self = Self(1_000_023_013); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR: Self = Self(1_000_023_014); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl StructureType { + pub const VIDEO_FORMAT_PROPERTIES_KHR: Self = Self(1_000_023_015); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl ObjectType { + pub const VIDEO_SESSION_KHR: Self = Self(1_000_023_000); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl ObjectType { + pub const VIDEO_SESSION_PARAMETERS_KHR: Self = Self(1_000_023_001); +} +#[doc = "Generated from 'VK_KHR_video_queue'"] impl QueryType { - pub const RESERVED_8: Self = Self(1_000_023_008); + pub const RESULT_STATUS_ONLY_KHR: Self = Self(1_000_023_000); } -impl AmdExtension25Fn { +#[doc = "Generated from 'VK_KHR_video_queue'"] +impl QueryResultFlags { + pub const WITH_STATUS_KHR: Self = Self(0b1_0000); +} +impl KhrVideoDecodeQueueFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_25\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_video_decode_queue\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDecodeVideoKHR = unsafe extern "system" fn( + command_buffer: CommandBuffer, + p_frame_info: *const VideoDecodeInfoKHR, +); #[derive(Clone)] -pub struct AmdExtension25Fn {} -unsafe impl Send for AmdExtension25Fn {} -unsafe impl Sync for AmdExtension25Fn {} -impl AmdExtension25Fn { +pub struct KhrVideoDecodeQueueFn { + pub cmd_decode_video_khr: PFN_vkCmdDecodeVideoKHR, +} +unsafe impl Send for KhrVideoDecodeQueueFn {} +unsafe impl Sync for KhrVideoDecodeQueueFn {} +impl KhrVideoDecodeQueueFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension25Fn {} + KhrVideoDecodeQueueFn { + cmd_decode_video_khr: unsafe { + unsafe extern "system" fn cmd_decode_video_khr( + _command_buffer: CommandBuffer, + _p_frame_info: *const VideoDecodeInfoKHR, + ) { + panic!(concat!("Unable to load ", stringify!(cmd_decode_video_khr))) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdDecodeVideoKHR\0"); + let val = _f(cname); + if val.is_null() { + cmd_decode_video_khr + } else { + ::std::mem::transmute(val) + } + }, + } + } + #[doc = ""] + pub unsafe fn cmd_decode_video_khr( + &self, + command_buffer: CommandBuffer, + p_frame_info: *const VideoDecodeInfoKHR, + ) { + (self.cmd_decode_video_khr)(command_buffer, p_frame_info) } } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] +impl StructureType { + pub const VIDEO_DECODE_INFO_KHR: Self = Self(1_000_024_000); +} +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl QueueFlags { - pub const RESERVED_5_KHR: Self = Self(0b10_0000); + pub const VIDEO_DECODE_KHR: Self = Self(0b10_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl PipelineStageFlags2KHR { - pub const RESERVED_27: Self = Self(0b1000_0000_0000_0000_0000_0000_0000); + pub const VIDEO_DECODE: Self = Self(0b100_0000_0000_0000_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl AccessFlags2KHR { - pub const RESERVED_READ_37: Self = Self(0b10_0000_0000_0000_0000_0000_0000_0000_0000_0000); + pub const VIDEO_DECODE_READ: Self = Self(0b1000_0000_0000_0000_0000_0000_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl AccessFlags2KHR { - pub const RESERVED_WRITE_38: Self = Self(0b100_0000_0000_0000_0000_0000_0000_0000_0000_0000); + pub const VIDEO_DECODE_WRITE: Self = Self(0b1_0000_0000_0000_0000_0000_0000_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl BufferUsageFlags { - pub const RESERVED_13_KHR: Self = Self(0b10_0000_0000_0000); + pub const VIDEO_DECODE_SRC_KHR: Self = Self(0b10_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl BufferUsageFlags { - pub const RESERVED_14_KHR: Self = Self(0b100_0000_0000_0000); + pub const VIDEO_DECODE_DST_KHR: Self = Self(0b100_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl ImageUsageFlags { - pub const RESERVED_10_KHR: Self = Self(0b100_0000_0000); + pub const VIDEO_DECODE_DST_KHR: Self = Self(0b100_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl ImageUsageFlags { - pub const RESERVED_11_KHR: Self = Self(0b1000_0000_0000); + pub const VIDEO_DECODE_SRC_KHR: Self = Self(0b1000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl ImageUsageFlags { - pub const RESERVED_12_KHR: Self = Self(0b1_0000_0000_0000); + pub const VIDEO_DECODE_DPB_KHR: Self = Self(0b1_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl FormatFeatureFlags { - pub const RESERVED_25_KHR: Self = Self(0b10_0000_0000_0000_0000_0000_0000); + pub const VIDEO_DECODE_OUTPUT_KHR: Self = Self(0b10_0000_0000_0000_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] impl FormatFeatureFlags { - pub const RESERVED_26_KHR: Self = Self(0b100_0000_0000_0000_0000_0000_0000); + pub const VIDEO_DECODE_DPB_KHR: Self = Self(0b100_0000_0000_0000_0000_0000_0000); } -#[doc = "Generated from 'VK_AMD_extension_25'"] +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] +impl ImageLayout { + pub const VIDEO_DECODE_DST_KHR: Self = Self(1_000_024_000); +} +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] +impl ImageLayout { + pub const VIDEO_DECODE_SRC_KHR: Self = Self(1_000_024_001); +} +#[doc = "Generated from 'VK_KHR_video_decode_queue'"] +impl ImageLayout { + pub const VIDEO_DECODE_DPB_KHR: Self = Self(1_000_024_002); +} +impl KhrVideoEncodeQueueFn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_video_encode_queue\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 1u32; +} +#[allow(non_camel_case_types)] +pub type PFN_vkCmdEncodeVideoKHR = unsafe extern "system" fn( + command_buffer: CommandBuffer, + p_encode_info: *const VideoEncodeInfoKHR, +); +#[derive(Clone)] +pub struct KhrVideoEncodeQueueFn { + pub cmd_encode_video_khr: PFN_vkCmdEncodeVideoKHR, +} +unsafe impl Send for KhrVideoEncodeQueueFn {} +unsafe impl Sync for KhrVideoEncodeQueueFn {} +impl KhrVideoEncodeQueueFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrVideoEncodeQueueFn { + cmd_encode_video_khr: unsafe { + unsafe extern "system" fn cmd_encode_video_khr( + _command_buffer: CommandBuffer, + _p_encode_info: *const VideoEncodeInfoKHR, + ) { + panic!(concat!("Unable to load ", stringify!(cmd_encode_video_khr))) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdEncodeVideoKHR\0"); + let val = _f(cname); + if val.is_null() { + cmd_encode_video_khr + } else { + ::std::mem::transmute(val) + } + }, + } + } + #[doc = ""] + pub unsafe fn cmd_encode_video_khr( + &self, + command_buffer: CommandBuffer, + p_encode_info: *const VideoEncodeInfoKHR, + ) { + (self.cmd_encode_video_khr)(command_buffer, p_encode_info) + } +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl PipelineStageFlags2KHR { + pub const VIDEO_ENCODE: Self = Self(0b1000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl AccessFlags2KHR { + pub const VIDEO_ENCODE_READ: Self = Self(0b10_0000_0000_0000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl AccessFlags2KHR { + pub const VIDEO_ENCODE_WRITE: Self = Self(0b100_0000_0000_0000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl StructureType { + pub const VIDEO_ENCODE_INFO_KHR: Self = Self(1_000_299_000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl StructureType { + pub const VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: Self = Self(1_000_299_001); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl QueueFlags { + pub const VIDEO_ENCODE_KHR: Self = Self(0b100_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl BufferUsageFlags { + pub const VIDEO_ENCODE_DST_KHR: Self = Self(0b1000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl BufferUsageFlags { + pub const VIDEO_ENCODE_SRC_KHR: Self = Self(0b1_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl ImageUsageFlags { + pub const VIDEO_ENCODE_DST_KHR: Self = Self(0b10_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl ImageUsageFlags { + pub const VIDEO_ENCODE_SRC_KHR: Self = Self(0b100_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl ImageUsageFlags { + pub const VIDEO_ENCODE_DPB_KHR: Self = Self(0b1000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl FormatFeatureFlags { + pub const VIDEO_ENCODE_INPUT_KHR: Self = Self(0b1000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl FormatFeatureFlags { + pub const VIDEO_ENCODE_DPB_KHR: Self = Self(0b1_0000_0000_0000_0000_0000_0000_0000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl ImageLayout { + pub const VIDEO_ENCODE_DST_KHR: Self = Self(1_000_299_000); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl ImageLayout { + pub const VIDEO_ENCODE_SRC_KHR: Self = Self(1_000_299_001); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] +impl ImageLayout { + pub const VIDEO_ENCODE_DPB_KHR: Self = Self(1_000_299_002); +} +#[doc = "Generated from 'VK_KHR_video_encode_queue'"] impl QueryType { - pub const RESERVED_4: Self = Self(1_000_024_004); + pub const VIDEO_ENCODESTREAM_BUFFER_RANGE_KHR: Self = Self(1_000_299_000); } impl AmdGcnShaderFn { pub fn name() -> &'static ::std::ffi::CStr { @@ -3310,62 +3978,119 @@ impl AmdShaderBallotFn { AmdShaderBallotFn {} } } -impl AmdExtension39Fn { +impl ExtVideoEncodeH264Fn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_39\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_video_encode_h264\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct AmdExtension39Fn {} -unsafe impl Send for AmdExtension39Fn {} -unsafe impl Sync for AmdExtension39Fn {} -impl AmdExtension39Fn { +pub struct ExtVideoEncodeH264Fn {} +unsafe impl Send for ExtVideoEncodeH264Fn {} +unsafe impl Sync for ExtVideoEncodeH264Fn {} +impl ExtVideoEncodeH264Fn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension39Fn {} + ExtVideoEncodeH264Fn {} } } -impl AmdExtension40Fn { +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_CAPABILITIES_EXT: Self = Self(1_000_038_000); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT: Self = Self(1_000_038_001); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT: Self = Self(1_000_038_002); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT: Self = Self(1_000_038_003); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT: Self = Self(1_000_038_004); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT: Self = Self(1_000_038_005); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_NALU_SLICE_EXT: Self = Self(1_000_038_006); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT: Self = Self(1_000_038_007); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl StructureType { + pub const VIDEO_ENCODE_H264_PROFILE_EXT: Self = Self(1_000_038_008); +} +#[doc = "Generated from 'VK_EXT_video_encode_h264'"] +impl VideoCodecOperationFlagsKHR { + pub const ENCODE_H264_EXT: Self = Self(0b1_0000_0000_0000_0000); +} +impl ExtVideoDecodeH264Fn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_40\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_video_decode_h264\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct AmdExtension40Fn {} -unsafe impl Send for AmdExtension40Fn {} -unsafe impl Sync for AmdExtension40Fn {} -impl AmdExtension40Fn { +pub struct ExtVideoDecodeH264Fn {} +unsafe impl Send for ExtVideoDecodeH264Fn {} +unsafe impl Sync for ExtVideoDecodeH264Fn {} +impl ExtVideoDecodeH264Fn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension40Fn {} + ExtVideoDecodeH264Fn {} } } -impl AmdExtension41Fn { - pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_41\0") - .expect("Wrong extension string") - } - pub const SPEC_VERSION: u32 = 0u32; +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_CAPABILITIES_EXT: Self = Self(1_000_040_000); } -#[derive(Clone)] -pub struct AmdExtension41Fn {} -unsafe impl Send for AmdExtension41Fn {} -unsafe impl Sync for AmdExtension41Fn {} -impl AmdExtension41Fn { - pub fn load(mut _f: F) -> Self - where - F: FnMut(&::std::ffi::CStr) -> *const c_void, - { - AmdExtension41Fn {} - } +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT: Self = Self(1_000_040_001); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_PICTURE_INFO_EXT: Self = Self(1_000_040_002); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_MVC_EXT: Self = Self(1_000_040_003); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_PROFILE_EXT: Self = Self(1_000_040_004); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT: Self = Self(1_000_040_005); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT: Self = Self(1_000_040_006); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl StructureType { + pub const VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT: Self = Self(1_000_040_007); +} +#[doc = "Generated from 'VK_EXT_video_decode_h264'"] +impl VideoCodecOperationFlagsKHR { + pub const DECODE_H264_EXT: Self = Self(0b1); } impl AmdTextureGatherBiasLodFn { pub fn name() -> &'static ::std::ffi::CStr { @@ -6134,7 +6859,7 @@ impl KhrIncrementalPresentFn { ::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_incremental_present\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 1u32; + pub const SPEC_VERSION: u32 = 2u32; } #[derive(Clone)] pub struct KhrIncrementalPresentFn {} @@ -14484,25 +15209,57 @@ impl AmdExtension187Fn { AmdExtension187Fn {} } } -impl AmdExtension188Fn { +impl ExtVideoDecodeH265Fn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_188\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_video_decode_h265\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct AmdExtension188Fn {} -unsafe impl Send for AmdExtension188Fn {} -unsafe impl Sync for AmdExtension188Fn {} -impl AmdExtension188Fn { +pub struct ExtVideoDecodeH265Fn {} +unsafe impl Send for ExtVideoDecodeH265Fn {} +unsafe impl Sync for ExtVideoDecodeH265Fn {} +impl ExtVideoDecodeH265Fn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension188Fn {} + ExtVideoDecodeH265Fn {} } } +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_CAPABILITIES_EXT: Self = Self(1_000_187_000); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT: Self = Self(1_000_187_001); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT: Self = Self(1_000_187_002); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT: Self = Self(1_000_187_003); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_PROFILE_EXT: Self = Self(1_000_187_004); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_PICTURE_INFO_EXT: Self = Self(1_000_187_005); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl StructureType { + pub const VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT: Self = Self(1_000_187_006); +} +#[doc = "Generated from 'VK_EXT_video_decode_h265'"] +impl VideoCodecOperationFlagsKHR { + pub const DECODE_H265_EXT: Self = Self(0b10); +} impl AmdExtension189Fn { pub fn name() -> &'static ::std::ffi::CStr { ::std::ffi::CStr::from_bytes_with_nul(b"VK_AMD_extension_189\0") @@ -19436,25 +20193,33 @@ impl AccessFlags { impl ObjectType { pub const INDIRECT_COMMANDS_LAYOUT_NV: Self = Self(1_000_277_000); } -impl NvExtension279Fn { +impl NvInheritedViewportScissorFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_279\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_inherited_viewport_scissor\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct NvExtension279Fn {} -unsafe impl Send for NvExtension279Fn {} -unsafe impl Sync for NvExtension279Fn {} -impl NvExtension279Fn { +pub struct NvInheritedViewportScissorFn {} +unsafe impl Send for NvInheritedViewportScissorFn {} +unsafe impl Sync for NvInheritedViewportScissorFn {} +impl NvInheritedViewportScissorFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension279Fn {} + NvInheritedViewportScissorFn {} } } +#[doc = "Generated from 'VK_NV_inherited_viewport_scissor'"] +impl StructureType { + pub const PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV: Self = Self(1_000_278_000); +} +#[doc = "Generated from 'VK_NV_inherited_viewport_scissor'"] +impl StructureType { + pub const COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV: Self = Self(1_000_278_001); +} impl KhrExtension280Fn { pub fn name() -> &'static ::std::ffi::CStr { ::std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_extension_280\0") @@ -19525,7 +20290,7 @@ impl QcomRenderPassTransformFn { ::std::ffi::CStr::from_bytes_with_nul(b"VK_QCOM_render_pass_transform\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 1u32; + pub const SPEC_VERSION: u32 = 2u32; } #[derive(Clone)] pub struct QcomRenderPassTransformFn {} @@ -21364,25 +22129,45 @@ impl NvExtension330Fn { NvExtension330Fn {} } } -impl NvExtension331Fn { +impl ExtYcbcr2plane444FormatsFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_331\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_ycbcr_2plane_444_formats\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } #[derive(Clone)] -pub struct NvExtension331Fn {} -unsafe impl Send for NvExtension331Fn {} -unsafe impl Sync for NvExtension331Fn {} -impl NvExtension331Fn { +pub struct ExtYcbcr2plane444FormatsFn {} +unsafe impl Send for ExtYcbcr2plane444FormatsFn {} +unsafe impl Sync for ExtYcbcr2plane444FormatsFn {} +impl ExtYcbcr2plane444FormatsFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension331Fn {} + ExtYcbcr2plane444FormatsFn {} } } +#[doc = "Generated from 'VK_EXT_ycbcr_2plane_444_formats'"] +impl StructureType { + pub const PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: Self = Self(1_000_330_000); +} +#[doc = "Generated from 'VK_EXT_ycbcr_2plane_444_formats'"] +impl Format { + pub const G8_B8R8_2PLANE_444_UNORM_EXT: Self = Self(1_000_330_000); +} +#[doc = "Generated from 'VK_EXT_ycbcr_2plane_444_formats'"] +impl Format { + pub const G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT: Self = Self(1_000_330_001); +} +#[doc = "Generated from 'VK_EXT_ycbcr_2plane_444_formats'"] +impl Format { + pub const G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT: Self = Self(1_000_330_002); +} +#[doc = "Generated from 'VK_EXT_ycbcr_2plane_444_formats'"] +impl Format { + pub const G16_B16R16_2PLANE_444_UNORM_EXT: Self = Self(1_000_330_003); +} impl NvExtension332Fn { pub fn name() -> &'static ::std::ffi::CStr { ::std::ffi::CStr::from_bytes_with_nul(b"VK_NV_extension_332\0") @@ -22197,24 +22982,90 @@ impl DescriptorPoolCreateFlags { impl DescriptorSetLayoutCreateFlags { pub const HOST_ONLY_POOL_VALVE: Self = Self(0b100); } -impl ExtExtension353Fn { +impl ExtVertexInputDynamicStateFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_353\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_vertex_input_dynamic_state\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 2u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetVertexInputEXT = unsafe extern "system" fn( + command_buffer: CommandBuffer, + vertex_binding_description_count: u32, + p_vertex_binding_descriptions: *const VertexInputBindingDescription2EXT, + vertex_attribute_description_count: u32, + p_vertex_attribute_descriptions: *const VertexInputAttributeDescription2EXT, +); #[derive(Clone)] -pub struct ExtExtension353Fn {} -unsafe impl Send for ExtExtension353Fn {} -unsafe impl Sync for ExtExtension353Fn {} -impl ExtExtension353Fn { +pub struct ExtVertexInputDynamicStateFn { + pub cmd_set_vertex_input_ext: PFN_vkCmdSetVertexInputEXT, +} +unsafe impl Send for ExtVertexInputDynamicStateFn {} +unsafe impl Sync for ExtVertexInputDynamicStateFn {} +impl ExtVertexInputDynamicStateFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension353Fn {} + ExtVertexInputDynamicStateFn { + cmd_set_vertex_input_ext: unsafe { + unsafe extern "system" fn cmd_set_vertex_input_ext( + _command_buffer: CommandBuffer, + _vertex_binding_description_count: u32, + _p_vertex_binding_descriptions: *const VertexInputBindingDescription2EXT, + _vertex_attribute_description_count: u32, + _p_vertex_attribute_descriptions: *const VertexInputAttributeDescription2EXT, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_vertex_input_ext) + )) + } + let cname = + ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"vkCmdSetVertexInputEXT\0"); + let val = _f(cname); + if val.is_null() { + cmd_set_vertex_input_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + #[doc = ""] + pub unsafe fn cmd_set_vertex_input_ext( + &self, + command_buffer: CommandBuffer, + vertex_binding_description_count: u32, + p_vertex_binding_descriptions: *const VertexInputBindingDescription2EXT, + vertex_attribute_description_count: u32, + p_vertex_attribute_descriptions: *const VertexInputAttributeDescription2EXT, + ) { + (self.cmd_set_vertex_input_ext)( + command_buffer, + vertex_binding_description_count, + p_vertex_binding_descriptions, + vertex_attribute_description_count, + p_vertex_attribute_descriptions, + ) + } +} +#[doc = "Generated from 'VK_EXT_vertex_input_dynamic_state'"] +impl StructureType { + pub const PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: Self = Self(1_000_352_000); +} +#[doc = "Generated from 'VK_EXT_vertex_input_dynamic_state'"] +impl StructureType { + pub const VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT: Self = Self(1_000_352_001); +} +#[doc = "Generated from 'VK_EXT_vertex_input_dynamic_state'"] +impl StructureType { + pub const VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT: Self = Self(1_000_352_002); +} +#[doc = "Generated from 'VK_EXT_vertex_input_dynamic_state'"] +impl DynamicState { + pub const VERTEX_INPUT_EXT: Self = Self(1_000_352_000); } impl ExtExtension354Fn { pub fn name() -> &'static ::std::ffi::CStr { @@ -23048,24 +23899,79 @@ impl KhrExtension381Fn { KhrExtension381Fn {} } } -impl ExtExtension382Fn { +impl ExtColorWriteEnableFn { pub fn name() -> &'static ::std::ffi::CStr { - ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_382\0") + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_color_write_enable\0") .expect("Wrong extension string") } - pub const SPEC_VERSION: u32 = 0u32; + pub const SPEC_VERSION: u32 = 1u32; } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetColorWriteEnableEXT = unsafe extern "system" fn( + command_buffer: CommandBuffer, + attachment_count: u32, + p_color_write_enables: *const Bool32, +); #[derive(Clone)] -pub struct ExtExtension382Fn {} -unsafe impl Send for ExtExtension382Fn {} -unsafe impl Sync for ExtExtension382Fn {} -impl ExtExtension382Fn { +pub struct ExtColorWriteEnableFn { + pub cmd_set_color_write_enable_ext: PFN_vkCmdSetColorWriteEnableEXT, +} +unsafe impl Send for ExtColorWriteEnableFn {} +unsafe impl Sync for ExtColorWriteEnableFn {} +impl ExtColorWriteEnableFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension382Fn {} + ExtColorWriteEnableFn { + cmd_set_color_write_enable_ext: unsafe { + unsafe extern "system" fn cmd_set_color_write_enable_ext( + _command_buffer: CommandBuffer, + _attachment_count: u32, + _p_color_write_enables: *const Bool32, + ) { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_color_write_enable_ext) + )) + } + let cname = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkCmdSetColorWriteEnableEXT\0", + ); + let val = _f(cname); + if val.is_null() { + cmd_set_color_write_enable_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + #[doc = ""] + pub unsafe fn cmd_set_color_write_enable_ext( + &self, + command_buffer: CommandBuffer, + attachment_count: u32, + p_color_write_enables: *const Bool32, + ) { + (self.cmd_set_color_write_enable_ext)( + command_buffer, + attachment_count, + p_color_write_enables, + ) + } +} +#[doc = "Generated from 'VK_EXT_color_write_enable'"] +impl StructureType { + pub const PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: Self = Self(1_000_381_000); +} +#[doc = "Generated from 'VK_EXT_color_write_enable'"] +impl StructureType { + pub const PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: Self = Self(1_000_381_001); +} +#[doc = "Generated from 'VK_EXT_color_write_enable'"] +impl DynamicState { + pub const COLOR_WRITE_ENABLE_EXT: Self = Self(1_000_381_000); } impl ExtExtension383Fn { pub fn name() -> &'static ::std::ffi::CStr { @@ -23257,3 +24163,41 @@ impl ExtExtension392Fn { ExtExtension392Fn {} } } +impl MesaMultiDrawFn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_MESA_multi_draw\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct MesaMultiDrawFn {} +unsafe impl Send for MesaMultiDrawFn {} +unsafe impl Sync for MesaMultiDrawFn {} +impl MesaMultiDrawFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + MesaMultiDrawFn {} + } +} +impl ExtExtension394Fn { + pub fn name() -> &'static ::std::ffi::CStr { + ::std::ffi::CStr::from_bytes_with_nul(b"VK_EXT_extension_394\0") + .expect("Wrong extension string") + } + pub const SPEC_VERSION: u32 = 0u32; +} +#[derive(Clone)] +pub struct ExtExtension394Fn {} +unsafe impl Send for ExtExtension394Fn {} +unsafe impl Sync for ExtExtension394Fn {} +impl ExtExtension394Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension394Fn {} + } +} diff --git a/ash/src/vk/native.rs b/ash/src/vk/native.rs new file mode 100644 index 0000000..f8d2bca --- /dev/null +++ b/ash/src/vk/native.rs @@ -0,0 +1,7439 @@ +/* automatically generated by rust-bindgen 0.58.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +pub type size_t = ::std::os::raw::c_ulong; +pub type __int8_t = ::std::os::raw::c_schar; +pub type __uint8_t = ::std::os::raw::c_uchar; +pub type __int16_t = ::std::os::raw::c_short; +pub type __uint16_t = ::std::os::raw::c_ushort; +pub type __int32_t = ::std::os::raw::c_int; +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __int64_t = ::std::os::raw::c_long; +pub type __uint64_t = ::std::os::raw::c_ulong; +pub const StdVideoH264ChromaFormatIdc_std_video_h264_chroma_format_idc_monochrome: + StdVideoH264ChromaFormatIdc = 0; +pub const StdVideoH264ChromaFormatIdc_std_video_h264_chroma_format_idc_420: + StdVideoH264ChromaFormatIdc = 1; +pub const StdVideoH264ChromaFormatIdc_std_video_h264_chroma_format_idc_422: + StdVideoH264ChromaFormatIdc = 2; +pub const StdVideoH264ChromaFormatIdc_std_video_h264_chroma_format_idc_444: + StdVideoH264ChromaFormatIdc = 3; +pub type StdVideoH264ChromaFormatIdc = ::std::os::raw::c_uint; +pub const StdVideoH264ProfileIdc_std_video_h264_profile_idc_baseline: StdVideoH264ProfileIdc = 66; +pub const StdVideoH264ProfileIdc_std_video_h264_profile_idc_main: StdVideoH264ProfileIdc = 77; +pub const StdVideoH264ProfileIdc_std_video_h264_profile_idc_high: StdVideoH264ProfileIdc = 100; +pub const StdVideoH264ProfileIdc_std_video_h264_profile_idc_high_444_predictive: + StdVideoH264ProfileIdc = 244; +pub const StdVideoH264ProfileIdc_std_video_h264_profile_idc_invalid: StdVideoH264ProfileIdc = + 2147483647; +pub type StdVideoH264ProfileIdc = ::std::os::raw::c_uint; +pub const StdVideoH264Level_std_video_h264_level_1_0: StdVideoH264Level = 0; +pub const StdVideoH264Level_std_video_h264_level_1_1: StdVideoH264Level = 1; +pub const StdVideoH264Level_std_video_h264_level_1_2: StdVideoH264Level = 2; +pub const StdVideoH264Level_std_video_h264_level_1_3: StdVideoH264Level = 3; +pub const StdVideoH264Level_std_video_h264_level_2_0: StdVideoH264Level = 4; +pub const StdVideoH264Level_std_video_h264_level_2_1: StdVideoH264Level = 5; +pub const StdVideoH264Level_std_video_h264_level_2_2: StdVideoH264Level = 6; +pub const StdVideoH264Level_std_video_h264_level_3_0: StdVideoH264Level = 7; +pub const StdVideoH264Level_std_video_h264_level_3_1: StdVideoH264Level = 8; +pub const StdVideoH264Level_std_video_h264_level_3_2: StdVideoH264Level = 9; +pub const StdVideoH264Level_std_video_h264_level_4_0: StdVideoH264Level = 10; +pub const StdVideoH264Level_std_video_h264_level_4_1: StdVideoH264Level = 11; +pub const StdVideoH264Level_std_video_h264_level_4_2: StdVideoH264Level = 12; +pub const StdVideoH264Level_std_video_h264_level_5_0: StdVideoH264Level = 13; +pub const StdVideoH264Level_std_video_h264_level_5_1: StdVideoH264Level = 14; +pub const StdVideoH264Level_std_video_h264_level_5_2: StdVideoH264Level = 15; +pub const StdVideoH264Level_std_video_h264_level_6_0: StdVideoH264Level = 16; +pub const StdVideoH264Level_std_video_h264_level_6_1: StdVideoH264Level = 17; +pub const StdVideoH264Level_std_video_h264_level_6_2: StdVideoH264Level = 18; +pub const StdVideoH264Level_std_video_h264_level_invalid: StdVideoH264Level = 2147483647; +pub type StdVideoH264Level = ::std::os::raw::c_uint; +pub const StdVideoH264PocType_std_video_h264_poc_type_0: StdVideoH264PocType = 0; +pub const StdVideoH264PocType_std_video_h264_poc_type_1: StdVideoH264PocType = 1; +pub const StdVideoH264PocType_std_video_h264_poc_type_2: StdVideoH264PocType = 2; +pub const StdVideoH264PocType_std_video_h264_poc_type_invalid: StdVideoH264PocType = 2147483647; +pub type StdVideoH264PocType = ::std::os::raw::c_uint; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_unspecified: + StdVideoH264AspectRatioIdc = 0; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_square: + StdVideoH264AspectRatioIdc = 1; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_12_11: + StdVideoH264AspectRatioIdc = 2; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_10_11: + StdVideoH264AspectRatioIdc = 3; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_16_11: + StdVideoH264AspectRatioIdc = 4; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_40_33: + StdVideoH264AspectRatioIdc = 5; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_24_11: + StdVideoH264AspectRatioIdc = 6; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_20_11: + StdVideoH264AspectRatioIdc = 7; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_32_11: + StdVideoH264AspectRatioIdc = 8; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_80_33: + StdVideoH264AspectRatioIdc = 9; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_18_11: + StdVideoH264AspectRatioIdc = 10; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_15_11: + StdVideoH264AspectRatioIdc = 11; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_64_33: + StdVideoH264AspectRatioIdc = 12; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_160_99: + StdVideoH264AspectRatioIdc = 13; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_4_3: + StdVideoH264AspectRatioIdc = 14; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_3_2: + StdVideoH264AspectRatioIdc = 15; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_2_1: + StdVideoH264AspectRatioIdc = 16; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_extended_sar: + StdVideoH264AspectRatioIdc = 255; +pub const StdVideoH264AspectRatioIdc_std_video_h264_aspect_ratio_idc_invalid: + StdVideoH264AspectRatioIdc = 2147483647; +pub type StdVideoH264AspectRatioIdc = ::std::os::raw::c_uint; +pub const StdVideoH264WeightedBiPredIdc_std_video_h264_default_weighted_b_slices_prediction_idc: + StdVideoH264WeightedBiPredIdc = 0; +pub const StdVideoH264WeightedBiPredIdc_std_video_h264_explicit_weighted_b_slices_prediction_idc: + StdVideoH264WeightedBiPredIdc = 1; +pub const StdVideoH264WeightedBiPredIdc_std_video_h264_implicit_weighted_b_slices_prediction_idc: + StdVideoH264WeightedBiPredIdc = 2; +pub const StdVideoH264WeightedBiPredIdc_std_video_h264_invalid_weighted_b_slices_prediction_idc: + StdVideoH264WeightedBiPredIdc = 2147483647; +pub type StdVideoH264WeightedBiPredIdc = ::std::os::raw::c_uint; +pub const StdVideoH264ModificationOfPicNumsIdc_std_video_h264_modification_of_pic_nums_idc_short_term_subtract : StdVideoH264ModificationOfPicNumsIdc = 0 ; +pub const StdVideoH264ModificationOfPicNumsIdc_std_video_h264_modification_of_pic_nums_idc_short_term_add : StdVideoH264ModificationOfPicNumsIdc = 1 ; +pub const StdVideoH264ModificationOfPicNumsIdc_std_video_h264_modification_of_pic_nums_idc_long_term : StdVideoH264ModificationOfPicNumsIdc = 2 ; +pub const StdVideoH264ModificationOfPicNumsIdc_std_video_h264_modification_of_pic_nums_idc_end: + StdVideoH264ModificationOfPicNumsIdc = 3; +pub const StdVideoH264ModificationOfPicNumsIdc_std_video_h264_modification_of_pic_nums_idc_invalid : StdVideoH264ModificationOfPicNumsIdc = 2147483647 ; +pub type StdVideoH264ModificationOfPicNumsIdc = ::std::os::raw::c_uint; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_end: + StdVideoH264MemMgmtControlOp = 0; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_unmark_short_term: + StdVideoH264MemMgmtControlOp = 1; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_unmark_long_term: + StdVideoH264MemMgmtControlOp = 2; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_mark_long_term: + StdVideoH264MemMgmtControlOp = 3; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_set_max_long_term_index : StdVideoH264MemMgmtControlOp = 4 ; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_unmark_all: + StdVideoH264MemMgmtControlOp = 5; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_mark_current_as_long_term : StdVideoH264MemMgmtControlOp = 6 ; +pub const StdVideoH264MemMgmtControlOp_std_video_h264_mem_mgmt_control_op_invalid: + StdVideoH264MemMgmtControlOp = 2147483647; +pub type StdVideoH264MemMgmtControlOp = ::std::os::raw::c_uint; +pub const StdVideoH264CabacInitIdc_std_video_h264_cabac_init_idc_0: StdVideoH264CabacInitIdc = 0; +pub const StdVideoH264CabacInitIdc_std_video_h264_cabac_init_idc_1: StdVideoH264CabacInitIdc = 1; +pub const StdVideoH264CabacInitIdc_std_video_h264_cabac_init_idc_2: StdVideoH264CabacInitIdc = 2; +pub const StdVideoH264CabacInitIdc_std_video_h264_cabac_init_idc_invalid: StdVideoH264CabacInitIdc = + 2147483647; +pub type StdVideoH264CabacInitIdc = ::std::os::raw::c_uint; +pub const StdVideoH264DisableDeblockingFilterIdc_std_video_h264_disable_deblocking_filter_idc_disabled : StdVideoH264DisableDeblockingFilterIdc = 0 ; +pub const StdVideoH264DisableDeblockingFilterIdc_std_video_h264_disable_deblocking_filter_idc_enabled : StdVideoH264DisableDeblockingFilterIdc = 1 ; +pub const StdVideoH264DisableDeblockingFilterIdc_std_video_h264_disable_deblocking_filter_idc_partial : StdVideoH264DisableDeblockingFilterIdc = 2 ; +pub const StdVideoH264DisableDeblockingFilterIdc_std_video_h264_disable_deblocking_filter_idc_invalid : StdVideoH264DisableDeblockingFilterIdc = 2147483647 ; +pub type StdVideoH264DisableDeblockingFilterIdc = ::std::os::raw::c_uint; +pub const StdVideoH264PictureType_std_video_h264_picture_type_i: StdVideoH264PictureType = 0; +pub const StdVideoH264PictureType_std_video_h264_picture_type_p: StdVideoH264PictureType = 1; +pub const StdVideoH264PictureType_std_video_h264_picture_type_b: StdVideoH264PictureType = 2; +pub const StdVideoH264PictureType_std_video_h264_picture_type_invalid: StdVideoH264PictureType = + 2147483647; +pub type StdVideoH264PictureType = ::std::os::raw::c_uint; +pub const StdVideoH264SliceType_std_video_h264_slice_type_i: StdVideoH264SliceType = 0; +pub const StdVideoH264SliceType_std_video_h264_slice_type_p: StdVideoH264SliceType = 1; +pub const StdVideoH264SliceType_std_video_h264_slice_type_b: StdVideoH264SliceType = 2; +pub const StdVideoH264SliceType_std_video_h264_slice_type_invalid: StdVideoH264SliceType = + 2147483647; +pub type StdVideoH264SliceType = ::std::os::raw::c_uint; +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SpsVuiFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +#[test] +fn bindgen_test_layout_StdVideoH264SpsVuiFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH264SpsVuiFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH264SpsVuiFlags)) + ); +} +impl StdVideoH264SpsVuiFlags { + #[inline] + pub fn aspect_ratio_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_aspect_ratio_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_appropriate_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_appropriate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_signal_type_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_signal_type_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_full_range_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_full_range_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn color_description_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_color_description_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn chroma_loc_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_loc_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn timing_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn fixed_frame_rate_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_fixed_frame_rate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn bitstream_restriction_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_bitstream_restriction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn nal_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_nal_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn vcl_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_vcl_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + aspect_ratio_info_present_flag: u32, + overscan_info_present_flag: u32, + overscan_appropriate_flag: u32, + video_signal_type_present_flag: u32, + video_full_range_flag: u32, + color_description_present_flag: u32, + chroma_loc_info_present_flag: u32, + timing_info_present_flag: u32, + fixed_frame_rate_flag: u32, + bitstream_restriction_flag: u32, + nal_hrd_parameters_present_flag: u32, + vcl_hrd_parameters_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let aspect_ratio_info_present_flag: u32 = + unsafe { ::std::mem::transmute(aspect_ratio_info_present_flag) }; + aspect_ratio_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let overscan_info_present_flag: u32 = + unsafe { ::std::mem::transmute(overscan_info_present_flag) }; + overscan_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let overscan_appropriate_flag: u32 = + unsafe { ::std::mem::transmute(overscan_appropriate_flag) }; + overscan_appropriate_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let video_signal_type_present_flag: u32 = + unsafe { ::std::mem::transmute(video_signal_type_present_flag) }; + video_signal_type_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let video_full_range_flag: u32 = + unsafe { ::std::mem::transmute(video_full_range_flag) }; + video_full_range_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let color_description_present_flag: u32 = + unsafe { ::std::mem::transmute(color_description_present_flag) }; + color_description_present_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let chroma_loc_info_present_flag: u32 = + unsafe { ::std::mem::transmute(chroma_loc_info_present_flag) }; + chroma_loc_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let timing_info_present_flag: u32 = + unsafe { ::std::mem::transmute(timing_info_present_flag) }; + timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let fixed_frame_rate_flag: u32 = + unsafe { ::std::mem::transmute(fixed_frame_rate_flag) }; + fixed_frame_rate_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let bitstream_restriction_flag: u32 = + unsafe { ::std::mem::transmute(bitstream_restriction_flag) }; + bitstream_restriction_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let nal_hrd_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(nal_hrd_parameters_present_flag) }; + nal_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let vcl_hrd_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(vcl_hrd_parameters_present_flag) }; + vcl_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264HrdParameters { + pub cpb_cnt_minus1: u8, + pub bit_rate_scale: u8, + pub cpb_size_scale: u8, + pub bit_rate_value_minus1: [u32; 32usize], + pub cpb_size_value_minus1: [u32; 32usize], + pub cbr_flag: [u8; 32usize], + pub initial_cpb_removal_delay_length_minus1: u32, + pub cpb_removal_delay_length_minus1: u32, + pub dpb_output_delay_length_minus1: u32, + pub time_offset_length: u32, +} +#[test] +fn bindgen_test_layout_StdVideoH264HrdParameters() { + assert_eq!( + ::std::mem::size_of::(), + 308usize, + concat!("Size of: ", stringify!(StdVideoH264HrdParameters)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SequenceParameterSetVui { + pub aspect_ratio_idc: StdVideoH264AspectRatioIdc, + pub sar_width: u16, + pub sar_height: u16, + pub video_format: u8, + pub color_primaries: u8, + pub transfer_characteristics: u8, + pub matrix_coefficients: u8, + pub num_units_in_tick: u32, + pub time_scale: u32, + pub hrd_parameters: StdVideoH264HrdParameters, + pub num_reorder_frames: u8, + pub max_dec_frame_buffering: u8, + pub flags: StdVideoH264SpsVuiFlags, +} +#[test] +fn bindgen_test_layout_StdVideoH264SequenceParameterSetVui() { + assert_eq!( + ::std::mem::size_of::(), + 336usize, + concat!("Size of: ", stringify!(StdVideoH264SequenceParameterSetVui)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoH264SequenceParameterSetVui) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).aspect_ratio_idc + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(aspect_ratio_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sar_width as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(sar_width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sar_height as *const _ + as usize + }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(sar_height) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).video_format as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(video_format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).color_primaries + as *const _ as usize + }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(color_primaries) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).transfer_characteristics + as *const _ as usize + }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(transfer_characteristics) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).matrix_coefficients + as *const _ as usize + }, + 11usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(matrix_coefficients) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).num_units_in_tick + as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(num_units_in_tick) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).time_scale as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(time_scale) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hrd_parameters + as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(hrd_parameters) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).num_reorder_frames + as *const _ as usize + }, + 328usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(num_reorder_frames) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).max_dec_frame_buffering + as *const _ as usize + }, + 329usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(max_dec_frame_buffering) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 332usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSetVui), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +#[test] +fn bindgen_test_layout_StdVideoH264SpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH264SpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH264SpsFlags)) + ); +} +impl StdVideoH264SpsFlags { + #[inline] + pub fn constraint_set0_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set0_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set1_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set1_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set2_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set2_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set3_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set3_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set4_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set4_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set5_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set5_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn direct_8x8_inference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_direct_8x8_inference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn mb_adaptive_frame_field_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_adaptive_frame_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn frame_mbs_only_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_mbs_only_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn delta_pic_order_always_zero_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_pic_order_always_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn residual_colour_transform_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_residual_colour_transform_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn gaps_in_frame_num_value_allowed_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_gaps_in_frame_num_value_allowed_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn first_picture_after_seek_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_first_picture_after_seek_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn qpprime_y_zero_transform_bypass_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_qpprime_y_zero_transform_bypass_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn frame_cropping_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_cropping_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn scaling_matrix_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_matrix_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + constraint_set0_flag: u32, + constraint_set1_flag: u32, + constraint_set2_flag: u32, + constraint_set3_flag: u32, + constraint_set4_flag: u32, + constraint_set5_flag: u32, + direct_8x8_inference_flag: u32, + mb_adaptive_frame_field_flag: u32, + frame_mbs_only_flag: u32, + delta_pic_order_always_zero_flag: u32, + residual_colour_transform_flag: u32, + gaps_in_frame_num_value_allowed_flag: u32, + first_picture_after_seek_flag: u32, + qpprime_y_zero_transform_bypass_flag: u32, + frame_cropping_flag: u32, + scaling_matrix_present_flag: u32, + vui_parameters_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let constraint_set0_flag: u32 = unsafe { ::std::mem::transmute(constraint_set0_flag) }; + constraint_set0_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let constraint_set1_flag: u32 = unsafe { ::std::mem::transmute(constraint_set1_flag) }; + constraint_set1_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let constraint_set2_flag: u32 = unsafe { ::std::mem::transmute(constraint_set2_flag) }; + constraint_set2_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let constraint_set3_flag: u32 = unsafe { ::std::mem::transmute(constraint_set3_flag) }; + constraint_set3_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let constraint_set4_flag: u32 = unsafe { ::std::mem::transmute(constraint_set4_flag) }; + constraint_set4_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let constraint_set5_flag: u32 = unsafe { ::std::mem::transmute(constraint_set5_flag) }; + constraint_set5_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let direct_8x8_inference_flag: u32 = + unsafe { ::std::mem::transmute(direct_8x8_inference_flag) }; + direct_8x8_inference_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let mb_adaptive_frame_field_flag: u32 = + unsafe { ::std::mem::transmute(mb_adaptive_frame_field_flag) }; + mb_adaptive_frame_field_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let frame_mbs_only_flag: u32 = unsafe { ::std::mem::transmute(frame_mbs_only_flag) }; + frame_mbs_only_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let delta_pic_order_always_zero_flag: u32 = + unsafe { ::std::mem::transmute(delta_pic_order_always_zero_flag) }; + delta_pic_order_always_zero_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let residual_colour_transform_flag: u32 = + unsafe { ::std::mem::transmute(residual_colour_transform_flag) }; + residual_colour_transform_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let gaps_in_frame_num_value_allowed_flag: u32 = + unsafe { ::std::mem::transmute(gaps_in_frame_num_value_allowed_flag) }; + gaps_in_frame_num_value_allowed_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let first_picture_after_seek_flag: u32 = + unsafe { ::std::mem::transmute(first_picture_after_seek_flag) }; + first_picture_after_seek_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let qpprime_y_zero_transform_bypass_flag: u32 = + unsafe { ::std::mem::transmute(qpprime_y_zero_transform_bypass_flag) }; + qpprime_y_zero_transform_bypass_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let frame_cropping_flag: u32 = unsafe { ::std::mem::transmute(frame_cropping_flag) }; + frame_cropping_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let scaling_matrix_present_flag: u32 = + unsafe { ::std::mem::transmute(scaling_matrix_present_flag) }; + scaling_matrix_present_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let vui_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(vui_parameters_present_flag) }; + vui_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct StdVideoH264ScalingLists { + pub scaling_list_present_mask: u8, + pub use_default_scaling_matrix_mask: u8, + pub ScalingList4x4: [[u8; 16usize]; 6usize], + pub ScalingList8x8: [[u8; 64usize]; 2usize], +} +#[test] +fn bindgen_test_layout_StdVideoH264ScalingLists() { + assert_eq!( + ::std::mem::size_of::(), + 226usize, + concat!("Size of: ", stringify!(StdVideoH264ScalingLists)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct StdVideoH264SequenceParameterSet { + pub profile_idc: StdVideoH264ProfileIdc, + pub level_idc: StdVideoH264Level, + pub seq_parameter_set_id: u8, + pub chroma_format_idc: StdVideoH264ChromaFormatIdc, + pub bit_depth_luma_minus8: u8, + pub bit_depth_chroma_minus8: u8, + pub log2_max_frame_num_minus4: u8, + pub pic_order_cnt_type: StdVideoH264PocType, + pub log2_max_pic_order_cnt_lsb_minus4: u8, + pub offset_for_non_ref_pic: i32, + pub offset_for_top_to_bottom_field: i32, + pub num_ref_frames_in_pic_order_cnt_cycle: u8, + pub max_num_ref_frames: u8, + pub pic_width_in_mbs_minus1: u32, + pub pic_height_in_map_units_minus1: u32, + pub frame_crop_left_offset: u32, + pub frame_crop_right_offset: u32, + pub frame_crop_top_offset: u32, + pub frame_crop_bottom_offset: u32, + pub flags: StdVideoH264SpsFlags, + pub offset_for_ref_frame: [i32; 255usize], + pub pScalingLists: *mut StdVideoH264ScalingLists, + pub pSequenceParameterSetVui: *mut StdVideoH264SequenceParameterSetVui, +} +#[test] +fn bindgen_test_layout_StdVideoH264SequenceParameterSet() { + assert_eq!( + ::std::mem::size_of::(), + 1104usize, + concat!("Size of: ", stringify!(StdVideoH264SequenceParameterSet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(StdVideoH264SequenceParameterSet) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).profile_idc as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(profile_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).level_idc as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(level_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).seq_parameter_set_id + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).chroma_format_idc + as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(chroma_format_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).bit_depth_luma_minus8 + as *const _ as usize + }, + 16usize, + 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 + }, + 17usize, + 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 + }, + 18usize, + 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 + }, + 20usize, + 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 + }, + 24usize, + 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 + }, + 28usize, + 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 + }, + 32usize, + 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 + }, + 36usize, + 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 + }, + 37usize, + 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 + }, + 40usize, + 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 + }, + 44usize, + 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 + }, + 48usize, + 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 + }, + 52usize, + 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 + }, + 56usize, + 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 + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(frame_crop_bottom_offset) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).offset_for_ref_frame + as *const _ as usize + }, + 68usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(offset_for_ref_frame) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pScalingLists as *const _ + as usize + }, + 1088usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pScalingLists) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSequenceParameterSetVui + as *const _ as usize + }, + 1096usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264SequenceParameterSet), + "::", + stringify!(pSequenceParameterSetVui) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264PpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +#[test] +fn bindgen_test_layout_StdVideoH264PpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH264PpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH264PpsFlags)) + ); +} +impl StdVideoH264PpsFlags { + #[inline] + pub fn transform_8x8_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_8x8_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn redundant_pic_cnt_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_redundant_pic_cnt_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_control_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_bipred_idc_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_idc_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn pic_order_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_pic_order_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn entropy_coding_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn scaling_matrix_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_matrix_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + transform_8x8_mode_flag: u32, + redundant_pic_cnt_present_flag: u32, + constrained_intra_pred_flag: u32, + deblocking_filter_control_present_flag: u32, + weighted_bipred_idc_flag: u32, + weighted_pred_flag: u32, + pic_order_present_flag: u32, + entropy_coding_mode_flag: u32, + scaling_matrix_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let transform_8x8_mode_flag: u32 = + unsafe { ::std::mem::transmute(transform_8x8_mode_flag) }; + transform_8x8_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let redundant_pic_cnt_present_flag: u32 = + unsafe { ::std::mem::transmute(redundant_pic_cnt_present_flag) }; + redundant_pic_cnt_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let constrained_intra_pred_flag: u32 = + unsafe { ::std::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let deblocking_filter_control_present_flag: u32 = + unsafe { ::std::mem::transmute(deblocking_filter_control_present_flag) }; + deblocking_filter_control_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let weighted_bipred_idc_flag: u32 = + unsafe { ::std::mem::transmute(weighted_bipred_idc_flag) }; + weighted_bipred_idc_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let pic_order_present_flag: u32 = + unsafe { ::std::mem::transmute(pic_order_present_flag) }; + pic_order_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let entropy_coding_mode_flag: u32 = + unsafe { ::std::mem::transmute(entropy_coding_mode_flag) }; + entropy_coding_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let scaling_matrix_present_flag: u32 = + unsafe { ::std::mem::transmute(scaling_matrix_present_flag) }; + scaling_matrix_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264PictureParameterSet { + pub seq_parameter_set_id: u8, + pub pic_parameter_set_id: u8, + pub num_ref_idx_l0_default_active_minus1: u8, + pub num_ref_idx_l1_default_active_minus1: u8, + pub weighted_bipred_idc: StdVideoH264WeightedBiPredIdc, + pub pic_init_qp_minus26: i8, + pub pic_init_qs_minus26: i8, + pub chroma_qp_index_offset: i8, + pub second_chroma_qp_index_offset: i8, + pub flags: StdVideoH264PpsFlags, + pub pScalingLists: *mut StdVideoH264ScalingLists, +} +#[test] +fn bindgen_test_layout_StdVideoH264PictureParameterSet() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(StdVideoH264PictureParameterSet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(StdVideoH264PictureParameterSet)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).seq_parameter_set_id + as *const _ as usize + }, + 0usize, + 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 + }, + 1usize, + 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 + }, + 2usize, + 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 + }, + 3usize, + 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 + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(weighted_bipred_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pic_init_qp_minus26 + as *const _ as usize + }, + 8usize, + 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 + }, + 9usize, + 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 + }, + 10usize, + 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 + }, + 11usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(second_chroma_qp_index_offset) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pScalingLists as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH264PictureParameterSet), + "::", + stringify!(pScalingLists) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264PictureInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264PictureInfoFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH264PictureInfoFlags) + ) + ); +} +impl StdVideoDecodeH264PictureInfoFlags { + #[inline] + pub fn field_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn bottom_field_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_bottom_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_reference(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn complementary_field_pair(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_complementary_field_pair(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + field_pic_flag: u32, + is_intra: u32, + bottom_field_flag: u32, + is_reference: u32, + complementary_field_pair: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let field_pic_flag: u32 = unsafe { ::std::mem::transmute(field_pic_flag) }; + field_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_intra: u32 = unsafe { ::std::mem::transmute(is_intra) }; + is_intra as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let bottom_field_flag: u32 = unsafe { ::std::mem::transmute(bottom_field_flag) }; + bottom_field_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let is_reference: u32 = unsafe { ::std::mem::transmute(is_reference) }; + is_reference as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let complementary_field_pair: u32 = + unsafe { ::std::mem::transmute(complementary_field_pair) }; + complementary_field_pair as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264PictureInfo { + pub seq_parameter_set_id: u8, + pub pic_parameter_set_id: u8, + pub reserved: u16, + pub frame_num: u16, + pub idr_pic_id: u16, + pub PicOrderCnt: [i32; 2usize], + pub flags: StdVideoDecodeH264PictureInfoFlags, +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264PictureInfo() { + assert_eq!( + ::std::mem::size_of::(), + 20usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264PictureInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoDecodeH264PictureInfo)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).seq_parameter_set_id + as *const _ as usize + }, + 0usize, + 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 + }, + 1usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).frame_num as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(frame_num) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).idr_pic_id as *const _ + as usize + }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(idr_pic_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).PicOrderCnt as *const _ + as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(PicOrderCnt) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264PictureInfo), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264ReferenceInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264ReferenceInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(StdVideoDecodeH264ReferenceInfoFlags) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH264ReferenceInfoFlags) + ) + ); +} +impl StdVideoDecodeH264ReferenceInfoFlags { + #[inline] + pub fn top_field_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_top_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn bottom_field_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_bottom_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_long_term(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_long_term(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_non_existing(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_non_existing(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + top_field_flag: u32, + bottom_field_flag: u32, + is_long_term: u32, + is_non_existing: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let top_field_flag: u32 = unsafe { ::std::mem::transmute(top_field_flag) }; + top_field_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let bottom_field_flag: u32 = unsafe { ::std::mem::transmute(bottom_field_flag) }; + bottom_field_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let is_long_term: u32 = unsafe { ::std::mem::transmute(is_long_term) }; + is_long_term as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let is_non_existing: u32 = unsafe { ::std::mem::transmute(is_non_existing) }; + is_non_existing as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264ReferenceInfo { + pub FrameNum: u16, + pub reserved: u16, + pub PicOrderCnt: [i32; 2usize], + pub flags: StdVideoDecodeH264ReferenceInfoFlags, +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264ReferenceInfo() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264ReferenceInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoDecodeH264ReferenceInfo)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).FrameNum as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(FrameNum) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).reserved as *const _ + as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).PicOrderCnt as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(PicOrderCnt) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH264ReferenceInfo), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264MvcElementFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264MvcElementFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264MvcElementFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH264MvcElementFlags) + ) + ); +} +impl StdVideoDecodeH264MvcElementFlags { + #[inline] + pub fn non_idr(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_non_idr(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn anchor_pic(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_anchor_pic(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn inter_view(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_inter_view(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + non_idr: u32, + anchor_pic: u32, + inter_view: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let non_idr: u32 = unsafe { ::std::mem::transmute(non_idr) }; + non_idr as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let anchor_pic: u32 = unsafe { ::std::mem::transmute(anchor_pic) }; + anchor_pic as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let inter_view: u32 = unsafe { ::std::mem::transmute(inter_view) }; + inter_view as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264MvcElement { + pub flags: StdVideoDecodeH264MvcElementFlags, + pub viewOrderIndex: u16, + pub viewId: u16, + pub temporalId: u16, + pub priorityId: u16, + pub numOfAnchorRefsInL0: u16, + pub viewIdOfAnchorRefsInL0: [u16; 15usize], + pub numOfAnchorRefsInL1: u16, + pub viewIdOfAnchorRefsInL1: [u16; 15usize], + pub numOfNonAnchorRefsInL0: u16, + pub viewIdOfNonAnchorRefsInL0: [u16; 15usize], + pub numOfNonAnchorRefsInL1: u16, + pub viewIdOfNonAnchorRefsInL1: [u16; 15usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264MvcElement() { + assert_eq!( + ::std::mem::size_of::(), + 140usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264MvcElement)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264Mvc { + pub viewId0: u32, + pub mvcElementCount: u32, + pub pMvcElements: *mut StdVideoDecodeH264MvcElement, +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH264Mvc() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(StdVideoDecodeH264Mvc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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) + ) + ); +} +pub const StdVideoH265ProfileIdc_std_video_h265_profile_idc_main: StdVideoH265ProfileIdc = 1; +pub const StdVideoH265ProfileIdc_std_video_h265_profile_idc_main_10: StdVideoH265ProfileIdc = 2; +pub const StdVideoH265ProfileIdc_std_video_h265_profile_idc_main_still_picture: + StdVideoH265ProfileIdc = 3; +pub const StdVideoH265ProfileIdc_std_video_h265_profile_idc_format_range_extensions: + StdVideoH265ProfileIdc = 4; +pub const StdVideoH265ProfileIdc_std_video_h265_profile_idc_scc_extensions: StdVideoH265ProfileIdc = + 9; +pub const StdVideoH265ProfileIdc_std_video_h265_profile_idc_invalid: StdVideoH265ProfileIdc = + 2147483647; +pub type StdVideoH265ProfileIdc = ::std::os::raw::c_uint; +pub const StdVideoH265Level_std_video_h265_level_1_0: StdVideoH265Level = 0; +pub const StdVideoH265Level_std_video_h265_level_2_0: StdVideoH265Level = 1; +pub const StdVideoH265Level_std_video_h265_level_2_1: StdVideoH265Level = 2; +pub const StdVideoH265Level_std_video_h265_level_3_0: StdVideoH265Level = 3; +pub const StdVideoH265Level_std_video_h265_level_3_1: StdVideoH265Level = 4; +pub const StdVideoH265Level_std_video_h265_level_4_0: StdVideoH265Level = 5; +pub const StdVideoH265Level_std_video_h265_level_4_1: StdVideoH265Level = 6; +pub const StdVideoH265Level_std_video_h265_level_5_0: StdVideoH265Level = 7; +pub const StdVideoH265Level_std_video_h265_level_5_1: StdVideoH265Level = 8; +pub const StdVideoH265Level_std_video_h265_level_5_2: StdVideoH265Level = 9; +pub const StdVideoH265Level_std_video_h265_level_6_0: StdVideoH265Level = 10; +pub const StdVideoH265Level_std_video_h265_level_6_1: StdVideoH265Level = 11; +pub const StdVideoH265Level_std_video_h265_level_6_2: StdVideoH265Level = 12; +pub const StdVideoH265Level_std_video_h265_level_invalid: StdVideoH265Level = 2147483647; +pub type StdVideoH265Level = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265DecPicBufMgr { + pub max_latency_increase_plus1: [u32; 7usize], + pub max_dec_pic_buffering_minus1: [u8; 7usize], + pub max_num_reorder_pics: [u8; 7usize], +} +#[test] +fn bindgen_test_layout_StdVideoH265DecPicBufMgr() { + assert_eq!( + ::std::mem::size_of::(), + 44usize, + concat!("Size of: ", stringify!(StdVideoH265DecPicBufMgr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SubLayerHrdParameters { + pub bit_rate_value_minus1: [u32; 32usize], + pub cpb_size_value_minus1: [u32; 32usize], + pub cpb_size_du_value_minus1: [u32; 32usize], + pub bit_rate_du_value_minus1: [u32; 32usize], + pub cbr_flag: u32, +} +#[test] +fn bindgen_test_layout_StdVideoH265SubLayerHrdParameters() { + assert_eq!( + ::std::mem::size_of::(), + 516usize, + concat!("Size of: ", stringify!(StdVideoH265SubLayerHrdParameters)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + 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) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265HrdFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub fixed_pic_rate_general_flag: u8, + pub fixed_pic_rate_within_cvs_flag: u8, + pub low_delay_hrd_flag: u8, +} +#[test] +fn bindgen_test_layout_StdVideoH265HrdFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265HrdFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265HrdFlags)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).fixed_pic_rate_general_flag as *const _ + as usize + }, + 1usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdFlags), + "::", + stringify!(fixed_pic_rate_general_flag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).fixed_pic_rate_within_cvs_flag + as *const _ as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdFlags), + "::", + stringify!(fixed_pic_rate_within_cvs_flag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).low_delay_hrd_flag as *const _ as usize + }, + 3usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdFlags), + "::", + stringify!(low_delay_hrd_flag) + ) + ); +} +impl StdVideoH265HrdFlags { + #[inline] + pub fn nal_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_nal_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn vcl_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_vcl_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn sub_pic_hrd_params_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_sub_pic_hrd_params_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn sub_pic_cpb_params_in_pic_timing_sei_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_sub_pic_cpb_params_in_pic_timing_sei_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + nal_hrd_parameters_present_flag: u32, + vcl_hrd_parameters_present_flag: u32, + sub_pic_hrd_params_present_flag: u32, + sub_pic_cpb_params_in_pic_timing_sei_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let nal_hrd_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(nal_hrd_parameters_present_flag) }; + nal_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let vcl_hrd_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(vcl_hrd_parameters_present_flag) }; + vcl_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let sub_pic_hrd_params_present_flag: u32 = + unsafe { ::std::mem::transmute(sub_pic_hrd_params_present_flag) }; + sub_pic_hrd_params_present_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let sub_pic_cpb_params_in_pic_timing_sei_flag: u32 = + unsafe { ::std::mem::transmute(sub_pic_cpb_params_in_pic_timing_sei_flag) }; + sub_pic_cpb_params_in_pic_timing_sei_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265HrdParameters { + pub tick_divisor_minus2: u8, + pub du_cpb_removal_delay_increment_length_minus1: u8, + pub dpb_output_delay_du_length_minus1: u8, + pub bit_rate_scale: u8, + pub cpb_size_scale: u8, + pub cpb_size_du_scale: u8, + pub initial_cpb_removal_delay_length_minus1: u8, + pub au_cpb_removal_delay_length_minus1: u8, + pub dpb_output_delay_length_minus1: u8, + pub cpb_cnt_minus1: [u8; 7usize], + pub elemental_duration_in_tc_minus1: [u16; 7usize], + pub SubLayerHrdParametersNal: [*mut StdVideoH265SubLayerHrdParameters; 7usize], + pub SubLayerHrdParametersVcl: [*mut StdVideoH265SubLayerHrdParameters; 7usize], + pub flags: StdVideoH265HrdFlags, +} +#[test] +fn bindgen_test_layout_StdVideoH265HrdParameters() { + assert_eq!( + ::std::mem::size_of::(), + 152usize, + concat!("Size of: ", stringify!(StdVideoH265HrdParameters)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(StdVideoH265HrdParameters)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).tick_divisor_minus2 as *const _ + as usize + }, + 0usize, + 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 + }, + 1usize, + 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 + }, + 2usize, + 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 + }, + 3usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(bit_rate_scale) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).cpb_size_scale as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(cpb_size_scale) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).cpb_size_du_scale as *const _ + as usize + }, + 5usize, + 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 + }, + 6usize, + 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 + }, + 7usize, + 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 + }, + 8usize, + 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 + }, + 9usize, + 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 + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(elemental_duration_in_tc_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SubLayerHrdParametersNal + as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(SubLayerHrdParametersNal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SubLayerHrdParametersVcl + as *const _ as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(SubLayerHrdParametersVcl) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265HrdParameters), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265VpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoH265VpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265VpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265VpsFlags)) + ); +} +impl StdVideoH265VpsFlags { + #[inline] + pub fn vps_temporal_id_nesting_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_temporal_id_nesting_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn vps_sub_layer_ordering_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_sub_layer_ordering_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn vps_timing_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn vps_poc_proportional_to_timing_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_poc_proportional_to_timing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + vps_temporal_id_nesting_flag: u32, + vps_sub_layer_ordering_info_present_flag: u32, + vps_timing_info_present_flag: u32, + vps_poc_proportional_to_timing_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let vps_temporal_id_nesting_flag: u32 = + unsafe { ::std::mem::transmute(vps_temporal_id_nesting_flag) }; + vps_temporal_id_nesting_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let vps_sub_layer_ordering_info_present_flag: u32 = + unsafe { ::std::mem::transmute(vps_sub_layer_ordering_info_present_flag) }; + vps_sub_layer_ordering_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let vps_timing_info_present_flag: u32 = + unsafe { ::std::mem::transmute(vps_timing_info_present_flag) }; + vps_timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let vps_poc_proportional_to_timing_flag: u32 = + unsafe { ::std::mem::transmute(vps_poc_proportional_to_timing_flag) }; + vps_poc_proportional_to_timing_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265VideoParameterSet { + pub vps_video_parameter_set_id: u8, + pub vps_max_sub_layers_minus1: u8, + pub vps_num_units_in_tick: u32, + pub vps_time_scale: u32, + pub vps_num_ticks_poc_diff_one_minus1: u32, + pub pDecPicBufMgr: *mut StdVideoH265DecPicBufMgr, + pub hrd_parameters: *mut StdVideoH265HrdParameters, + pub flags: StdVideoH265VpsFlags, +} +#[test] +fn bindgen_test_layout_StdVideoH265VideoParameterSet() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(StdVideoH265VideoParameterSet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(StdVideoH265VideoParameterSet)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).vps_video_parameter_set_id + as *const _ as usize + }, + 0usize, + 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 + }, + 1usize, + 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 + }, + 4usize, + 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 + }, + 8usize, + 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 + }, + 12usize, + 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 + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(pDecPicBufMgr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hrd_parameters as *const _ + as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(hrd_parameters) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265VideoParameterSet), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct StdVideoH265ScalingLists { + pub ScalingList4x4: [[u8; 16usize]; 6usize], + pub ScalingList8x8: [[u8; 64usize]; 6usize], + pub ScalingList16x16: [[u8; 64usize]; 6usize], + pub ScalingList32x32: [[u8; 64usize]; 2usize], + pub ScalingListDCCoef16x16: [u8; 6usize], + pub ScalingListDCCoef32x32: [u8; 2usize], +} +#[test] +fn bindgen_test_layout_StdVideoH265ScalingLists() { + assert_eq!( + ::std::mem::size_of::(), + 1000usize, + concat!("Size of: ", stringify!(StdVideoH265ScalingLists)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SpsVuiFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +#[test] +fn bindgen_test_layout_StdVideoH265SpsVuiFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265SpsVuiFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265SpsVuiFlags)) + ); +} +impl StdVideoH265SpsVuiFlags { + #[inline] + pub fn aspect_ratio_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_aspect_ratio_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_appropriate_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_appropriate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_signal_type_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_signal_type_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_full_range_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_full_range_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn colour_description_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_colour_description_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn chroma_loc_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_loc_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn neutral_chroma_indication_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_neutral_chroma_indication_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn field_seq_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_seq_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn frame_field_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_field_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn default_display_window_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_default_display_window_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_timing_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_poc_proportional_to_timing_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_poc_proportional_to_timing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn bitstream_restriction_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_bitstream_restriction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn tiles_fixed_structure_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_fixed_structure_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn motion_vectors_over_pic_boundaries_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_motion_vectors_over_pic_boundaries_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn restricted_ref_pic_lists_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_restricted_ref_pic_lists_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + aspect_ratio_info_present_flag: u32, + overscan_info_present_flag: u32, + overscan_appropriate_flag: u32, + video_signal_type_present_flag: u32, + video_full_range_flag: u32, + colour_description_present_flag: u32, + chroma_loc_info_present_flag: u32, + neutral_chroma_indication_flag: u32, + field_seq_flag: u32, + frame_field_info_present_flag: u32, + default_display_window_flag: u32, + vui_timing_info_present_flag: u32, + vui_poc_proportional_to_timing_flag: u32, + vui_hrd_parameters_present_flag: u32, + bitstream_restriction_flag: u32, + tiles_fixed_structure_flag: u32, + motion_vectors_over_pic_boundaries_flag: u32, + restricted_ref_pic_lists_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let aspect_ratio_info_present_flag: u32 = + unsafe { ::std::mem::transmute(aspect_ratio_info_present_flag) }; + aspect_ratio_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let overscan_info_present_flag: u32 = + unsafe { ::std::mem::transmute(overscan_info_present_flag) }; + overscan_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let overscan_appropriate_flag: u32 = + unsafe { ::std::mem::transmute(overscan_appropriate_flag) }; + overscan_appropriate_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let video_signal_type_present_flag: u32 = + unsafe { ::std::mem::transmute(video_signal_type_present_flag) }; + video_signal_type_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let video_full_range_flag: u32 = + unsafe { ::std::mem::transmute(video_full_range_flag) }; + video_full_range_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let colour_description_present_flag: u32 = + unsafe { ::std::mem::transmute(colour_description_present_flag) }; + colour_description_present_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let chroma_loc_info_present_flag: u32 = + unsafe { ::std::mem::transmute(chroma_loc_info_present_flag) }; + chroma_loc_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let neutral_chroma_indication_flag: u32 = + unsafe { ::std::mem::transmute(neutral_chroma_indication_flag) }; + neutral_chroma_indication_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let field_seq_flag: u32 = unsafe { ::std::mem::transmute(field_seq_flag) }; + field_seq_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let frame_field_info_present_flag: u32 = + unsafe { ::std::mem::transmute(frame_field_info_present_flag) }; + frame_field_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let default_display_window_flag: u32 = + unsafe { ::std::mem::transmute(default_display_window_flag) }; + default_display_window_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let vui_timing_info_present_flag: u32 = + unsafe { ::std::mem::transmute(vui_timing_info_present_flag) }; + vui_timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let vui_poc_proportional_to_timing_flag: u32 = + unsafe { ::std::mem::transmute(vui_poc_proportional_to_timing_flag) }; + vui_poc_proportional_to_timing_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let vui_hrd_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(vui_hrd_parameters_present_flag) }; + vui_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let bitstream_restriction_flag: u32 = + unsafe { ::std::mem::transmute(bitstream_restriction_flag) }; + bitstream_restriction_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let tiles_fixed_structure_flag: u32 = + unsafe { ::std::mem::transmute(tiles_fixed_structure_flag) }; + tiles_fixed_structure_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let motion_vectors_over_pic_boundaries_flag: u32 = + unsafe { ::std::mem::transmute(motion_vectors_over_pic_boundaries_flag) }; + motion_vectors_over_pic_boundaries_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let restricted_ref_pic_lists_flag: u32 = + unsafe { ::std::mem::transmute(restricted_ref_pic_lists_flag) }; + restricted_ref_pic_lists_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SequenceParameterSetVui { + pub aspect_ratio_idc: u8, + pub sar_width: u16, + pub sar_height: u16, + pub video_format: u8, + pub colour_primaries: u8, + pub transfer_characteristics: u8, + pub matrix_coeffs: u8, + pub chroma_sample_loc_type_top_field: u8, + pub chroma_sample_loc_type_bottom_field: u8, + pub def_disp_win_left_offset: u16, + pub def_disp_win_right_offset: u16, + pub def_disp_win_top_offset: u16, + pub def_disp_win_bottom_offset: u16, + pub vui_num_units_in_tick: u32, + pub vui_time_scale: u32, + pub vui_num_ticks_poc_diff_one_minus1: u32, + pub hrd_parameters: *mut StdVideoH265HrdParameters, + pub min_spatial_segmentation_idc: u16, + pub max_bytes_per_pic_denom: u8, + pub max_bits_per_min_cu_denom: u8, + pub log2_max_mv_length_horizontal: u8, + pub log2_max_mv_length_vertical: u8, + pub flags: StdVideoH265SpsVuiFlags, +} +#[test] +fn bindgen_test_layout_StdVideoH265SequenceParameterSetVui() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(StdVideoH265SequenceParameterSetVui)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(StdVideoH265SequenceParameterSetVui) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).aspect_ratio_idc + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(aspect_ratio_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sar_width as *const _ + as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(sar_width) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sar_height as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(sar_height) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).video_format as *const _ + as usize + }, + 6usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(video_format) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).colour_primaries + as *const _ as usize + }, + 7usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(colour_primaries) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).transfer_characteristics + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(transfer_characteristics) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).matrix_coeffs + as *const _ as usize + }, + 9usize, + 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 + }, + 10usize, + 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 + }, + 11usize, + 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 + }, + 12usize, + 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 + }, + 14usize, + 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 + }, + 16usize, + 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 + }, + 18usize, + 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 + }, + 20usize, + 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 + }, + 24usize, + 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 + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(vui_num_ticks_poc_diff_one_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).hrd_parameters + as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(hrd_parameters) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .min_spatial_segmentation_idc as *const _ as usize + }, + 40usize, + 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 + }, + 42usize, + 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 + }, + 43usize, + 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 + }, + 44usize, + 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 + }, + 45usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(log2_max_mv_length_vertical) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ + as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSetVui), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct StdVideoH265PredictorPaletteEntries { + pub PredictorPaletteEntries: [[u16; 128usize]; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoH265PredictorPaletteEntries() { + assert_eq!( + ::std::mem::size_of::(), + 768usize, + concat!("Size of: ", stringify!(StdVideoH265PredictorPaletteEntries)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!( + "Alignment of ", + stringify!(StdVideoH265PredictorPaletteEntries) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).PredictorPaletteEntries + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PredictorPaletteEntries), + "::", + stringify!(PredictorPaletteEntries) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_StdVideoH265SpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265SpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265SpsFlags)) + ); +} +impl StdVideoH265SpsFlags { + #[inline] + pub fn sps_temporal_id_nesting_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_id_nesting_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn separate_colour_plane_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_separate_colour_plane_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn scaling_list_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_scaling_list_data_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_scaling_list_data_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn amp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_amp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn sample_adaptive_offset_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_sample_adaptive_offset_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn pcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn pcm_loop_filter_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_loop_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn long_term_ref_pics_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_ref_pics_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn strong_intra_smoothing_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_strong_intra_smoothing_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_parameters_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_extension_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_range_extension_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_range_extension_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn transform_skip_rotation_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_rotation_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn transform_skip_context_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_context_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn implicit_rdpcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_implicit_rdpcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn explicit_rdpcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_explicit_rdpcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn extended_precision_processing_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_extended_precision_processing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn intra_smoothing_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_smoothing_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn high_precision_offsets_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_high_precision_offsets_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn persistent_rice_adaptation_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } + } + #[inline] + pub fn set_persistent_rice_adaptation_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub fn cabac_bypass_alignment_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_bypass_alignment_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_curr_pic_ref_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_curr_pic_ref_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub fn palette_mode_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } + } + #[inline] + pub fn set_palette_mode_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_palette_predictor_initializer_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_palette_predictor_initializer_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub fn intra_boundary_filtering_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_boundary_filtering_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + sps_temporal_id_nesting_flag: u32, + separate_colour_plane_flag: u32, + scaling_list_enabled_flag: u32, + sps_scaling_list_data_present_flag: u32, + amp_enabled_flag: u32, + sample_adaptive_offset_enabled_flag: u32, + pcm_enabled_flag: u32, + pcm_loop_filter_disabled_flag: u32, + long_term_ref_pics_present_flag: u32, + sps_temporal_mvp_enabled_flag: u32, + strong_intra_smoothing_enabled_flag: u32, + vui_parameters_present_flag: u32, + sps_extension_present_flag: u32, + sps_range_extension_flag: u32, + transform_skip_rotation_enabled_flag: u32, + transform_skip_context_enabled_flag: u32, + implicit_rdpcm_enabled_flag: u32, + explicit_rdpcm_enabled_flag: u32, + extended_precision_processing_flag: u32, + intra_smoothing_disabled_flag: u32, + high_precision_offsets_enabled_flag: u32, + persistent_rice_adaptation_enabled_flag: u32, + cabac_bypass_alignment_enabled_flag: u32, + sps_curr_pic_ref_enabled_flag: u32, + palette_mode_enabled_flag: u32, + sps_palette_predictor_initializer_present_flag: u32, + intra_boundary_filtering_disabled_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let sps_temporal_id_nesting_flag: u32 = + unsafe { ::std::mem::transmute(sps_temporal_id_nesting_flag) }; + sps_temporal_id_nesting_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let separate_colour_plane_flag: u32 = + unsafe { ::std::mem::transmute(separate_colour_plane_flag) }; + separate_colour_plane_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let scaling_list_enabled_flag: u32 = + unsafe { ::std::mem::transmute(scaling_list_enabled_flag) }; + scaling_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let sps_scaling_list_data_present_flag: u32 = + unsafe { ::std::mem::transmute(sps_scaling_list_data_present_flag) }; + sps_scaling_list_data_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let amp_enabled_flag: u32 = unsafe { ::std::mem::transmute(amp_enabled_flag) }; + amp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let sample_adaptive_offset_enabled_flag: u32 = + unsafe { ::std::mem::transmute(sample_adaptive_offset_enabled_flag) }; + sample_adaptive_offset_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let pcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_enabled_flag) }; + pcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let pcm_loop_filter_disabled_flag: u32 = + unsafe { ::std::mem::transmute(pcm_loop_filter_disabled_flag) }; + pcm_loop_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let long_term_ref_pics_present_flag: u32 = + unsafe { ::std::mem::transmute(long_term_ref_pics_present_flag) }; + long_term_ref_pics_present_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let sps_temporal_mvp_enabled_flag: u32 = + unsafe { ::std::mem::transmute(sps_temporal_mvp_enabled_flag) }; + sps_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let strong_intra_smoothing_enabled_flag: u32 = + unsafe { ::std::mem::transmute(strong_intra_smoothing_enabled_flag) }; + strong_intra_smoothing_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let vui_parameters_present_flag: u32 = + unsafe { ::std::mem::transmute(vui_parameters_present_flag) }; + vui_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let sps_extension_present_flag: u32 = + unsafe { ::std::mem::transmute(sps_extension_present_flag) }; + sps_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let sps_range_extension_flag: u32 = + unsafe { ::std::mem::transmute(sps_range_extension_flag) }; + sps_range_extension_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let transform_skip_rotation_enabled_flag: u32 = + unsafe { ::std::mem::transmute(transform_skip_rotation_enabled_flag) }; + transform_skip_rotation_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let transform_skip_context_enabled_flag: u32 = + unsafe { ::std::mem::transmute(transform_skip_context_enabled_flag) }; + transform_skip_context_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let implicit_rdpcm_enabled_flag: u32 = + unsafe { ::std::mem::transmute(implicit_rdpcm_enabled_flag) }; + implicit_rdpcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let explicit_rdpcm_enabled_flag: u32 = + unsafe { ::std::mem::transmute(explicit_rdpcm_enabled_flag) }; + explicit_rdpcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let extended_precision_processing_flag: u32 = + unsafe { ::std::mem::transmute(extended_precision_processing_flag) }; + extended_precision_processing_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let intra_smoothing_disabled_flag: u32 = + unsafe { ::std::mem::transmute(intra_smoothing_disabled_flag) }; + intra_smoothing_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let high_precision_offsets_enabled_flag: u32 = + unsafe { ::std::mem::transmute(high_precision_offsets_enabled_flag) }; + high_precision_offsets_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let persistent_rice_adaptation_enabled_flag: u32 = + unsafe { ::std::mem::transmute(persistent_rice_adaptation_enabled_flag) }; + persistent_rice_adaptation_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let cabac_bypass_alignment_enabled_flag: u32 = + unsafe { ::std::mem::transmute(cabac_bypass_alignment_enabled_flag) }; + cabac_bypass_alignment_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let sps_curr_pic_ref_enabled_flag: u32 = + unsafe { ::std::mem::transmute(sps_curr_pic_ref_enabled_flag) }; + sps_curr_pic_ref_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let palette_mode_enabled_flag: u32 = + unsafe { ::std::mem::transmute(palette_mode_enabled_flag) }; + palette_mode_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let sps_palette_predictor_initializer_present_flag: u32 = + unsafe { ::std::mem::transmute(sps_palette_predictor_initializer_present_flag) }; + sps_palette_predictor_initializer_present_flag as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let intra_boundary_filtering_disabled_flag: u32 = + unsafe { ::std::mem::transmute(intra_boundary_filtering_disabled_flag) }; + intra_boundary_filtering_disabled_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SequenceParameterSet { + pub profile_idc: StdVideoH265ProfileIdc, + pub level_idc: StdVideoH265Level, + pub pic_width_in_luma_samples: u32, + pub pic_height_in_luma_samples: u32, + pub sps_video_parameter_set_id: u8, + pub sps_max_sub_layers_minus1: u8, + pub sps_seq_parameter_set_id: u8, + pub chroma_format_idc: u8, + pub bit_depth_luma_minus8: u8, + pub bit_depth_chroma_minus8: u8, + pub log2_max_pic_order_cnt_lsb_minus4: u8, + pub sps_max_dec_pic_buffering_minus1: u8, + pub log2_min_luma_coding_block_size_minus3: u8, + pub log2_diff_max_min_luma_coding_block_size: u8, + pub log2_min_luma_transform_block_size_minus2: u8, + pub log2_diff_max_min_luma_transform_block_size: u8, + pub max_transform_hierarchy_depth_inter: u8, + pub max_transform_hierarchy_depth_intra: u8, + pub num_short_term_ref_pic_sets: u8, + pub num_long_term_ref_pics_sps: u8, + pub pcm_sample_bit_depth_luma_minus1: u8, + pub pcm_sample_bit_depth_chroma_minus1: u8, + pub log2_min_pcm_luma_coding_block_size_minus3: u8, + pub log2_diff_max_min_pcm_luma_coding_block_size: u8, + pub conf_win_left_offset: u32, + pub conf_win_right_offset: u32, + pub conf_win_top_offset: u32, + pub conf_win_bottom_offset: u32, + pub pDecPicBufMgr: *mut StdVideoH265DecPicBufMgr, + pub flags: StdVideoH265SpsFlags, + pub pScalingLists: *mut StdVideoH265ScalingLists, + pub pSequenceParameterSetVui: *mut StdVideoH265SequenceParameterSetVui, + pub palette_max_size: u8, + pub delta_palette_max_predictor_size: u8, + pub motion_vector_resolution_control_idc: u8, + pub sps_num_palette_predictor_initializer_minus1: u8, + pub pPredictorPaletteEntries: *mut StdVideoH265PredictorPaletteEntries, +} +#[test] +fn bindgen_test_layout_StdVideoH265SequenceParameterSet() { + assert_eq!( + ::std::mem::size_of::(), + 104usize, + concat!("Size of: ", stringify!(StdVideoH265SequenceParameterSet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(StdVideoH265SequenceParameterSet) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).profile_idc as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(profile_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).level_idc as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(level_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pic_width_in_luma_samples + as *const _ as usize + }, + 8usize, + 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 + }, + 12usize, + 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 + }, + 16usize, + 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 + }, + 17usize, + 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 + }, + 18usize, + 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 + }, + 19usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(chroma_format_idc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).bit_depth_luma_minus8 + as *const _ as usize + }, + 20usize, + 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 + }, + 21usize, + 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 + }, + 22usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(log2_max_pic_order_cnt_lsb_minus4) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .sps_max_dec_pic_buffering_minus1 as *const _ as usize + }, + 23usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(sps_max_dec_pic_buffering_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())) + .log2_min_luma_coding_block_size_minus3 as *const _ as usize + }, + 24usize, + 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 + }, + 25usize, + 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 + }, + 26usize, + 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 + }, + 27usize, + 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 + }, + 28usize, + 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 + }, + 29usize, + 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 + }, + 30usize, + 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 + }, + 31usize, + 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 + }, + 32usize, + 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 + }, + 33usize, + 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 + }, + 34usize, + 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 + }, + 35usize, + 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 + }, + 36usize, + 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 + }, + 40usize, + 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 + }, + 44usize, + 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 + }, + 48usize, + 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::())).flags as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pScalingLists as *const _ + as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pScalingLists) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSequenceParameterSetVui + as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pSequenceParameterSetVui) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).palette_max_size + as *const _ as usize + }, + 88usize, + 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 + }, + 89usize, + 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 + }, + 90usize, + 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 + }, + 91usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(sps_num_palette_predictor_initializer_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pPredictorPaletteEntries + as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265SequenceParameterSet), + "::", + stringify!(pPredictorPaletteEntries) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_StdVideoH265PpsFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoH265PpsFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoH265PpsFlags)) + ); +} +impl StdVideoH265PpsFlags { + #[inline] + pub fn dependent_slice_segments_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn output_flag_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_output_flag_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn sign_data_hiding_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn cabac_init_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_init_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn transform_skip_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn cu_qp_delta_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu_qp_delta_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_slice_chroma_qp_offsets_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_slice_chroma_qp_offsets_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_bipred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn transquant_bypass_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_transquant_bypass_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn tiles_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn entropy_coding_sync_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_sync_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn uniform_spacing_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_uniform_spacing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn loop_filter_across_tiles_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_across_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_control_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_override_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_override_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_deblocking_filter_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_deblocking_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_scaling_list_data_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_scaling_list_data_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn lists_modification_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_lists_modification_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_segment_header_extension_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_segment_header_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_extension_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub fn cross_component_prediction_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } + } + #[inline] + pub fn set_cross_component_prediction_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub fn chroma_qp_offset_list_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_qp_offset_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_curr_pic_ref_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_curr_pic_ref_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub fn residual_adaptive_colour_transform_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_residual_adaptive_colour_transform_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_slice_act_qp_offsets_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_slice_act_qp_offsets_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_palette_predictor_initializer_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_palette_predictor_initializer_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub fn monochrome_palette_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } + } + #[inline] + pub fn set_monochrome_palette_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_range_extension_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_range_extension_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + dependent_slice_segments_enabled_flag: u32, + output_flag_present_flag: u32, + sign_data_hiding_enabled_flag: u32, + cabac_init_present_flag: u32, + constrained_intra_pred_flag: u32, + transform_skip_enabled_flag: u32, + cu_qp_delta_enabled_flag: u32, + pps_slice_chroma_qp_offsets_present_flag: u32, + weighted_pred_flag: u32, + weighted_bipred_flag: u32, + transquant_bypass_enabled_flag: u32, + tiles_enabled_flag: u32, + entropy_coding_sync_enabled_flag: u32, + uniform_spacing_flag: u32, + loop_filter_across_tiles_enabled_flag: u32, + pps_loop_filter_across_slices_enabled_flag: u32, + deblocking_filter_control_present_flag: u32, + deblocking_filter_override_enabled_flag: u32, + pps_deblocking_filter_disabled_flag: u32, + pps_scaling_list_data_present_flag: u32, + lists_modification_present_flag: u32, + slice_segment_header_extension_present_flag: u32, + pps_extension_present_flag: u32, + cross_component_prediction_enabled_flag: u32, + chroma_qp_offset_list_enabled_flag: u32, + pps_curr_pic_ref_enabled_flag: u32, + residual_adaptive_colour_transform_enabled_flag: u32, + pps_slice_act_qp_offsets_present_flag: u32, + pps_palette_predictor_initializer_present_flag: u32, + monochrome_palette_flag: u32, + pps_range_extension_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let dependent_slice_segments_enabled_flag: u32 = + unsafe { ::std::mem::transmute(dependent_slice_segments_enabled_flag) }; + dependent_slice_segments_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let output_flag_present_flag: u32 = + unsafe { ::std::mem::transmute(output_flag_present_flag) }; + output_flag_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let sign_data_hiding_enabled_flag: u32 = + unsafe { ::std::mem::transmute(sign_data_hiding_enabled_flag) }; + sign_data_hiding_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cabac_init_present_flag: u32 = + unsafe { ::std::mem::transmute(cabac_init_present_flag) }; + cabac_init_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let constrained_intra_pred_flag: u32 = + unsafe { ::std::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let transform_skip_enabled_flag: u32 = + unsafe { ::std::mem::transmute(transform_skip_enabled_flag) }; + transform_skip_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let cu_qp_delta_enabled_flag: u32 = + unsafe { ::std::mem::transmute(cu_qp_delta_enabled_flag) }; + cu_qp_delta_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let pps_slice_chroma_qp_offsets_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_slice_chroma_qp_offsets_present_flag) }; + pps_slice_chroma_qp_offsets_present_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let weighted_bipred_flag: u32 = unsafe { ::std::mem::transmute(weighted_bipred_flag) }; + weighted_bipred_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let transquant_bypass_enabled_flag: u32 = + unsafe { ::std::mem::transmute(transquant_bypass_enabled_flag) }; + transquant_bypass_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let tiles_enabled_flag: u32 = unsafe { ::std::mem::transmute(tiles_enabled_flag) }; + tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let entropy_coding_sync_enabled_flag: u32 = + unsafe { ::std::mem::transmute(entropy_coding_sync_enabled_flag) }; + entropy_coding_sync_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let uniform_spacing_flag: u32 = unsafe { ::std::mem::transmute(uniform_spacing_flag) }; + uniform_spacing_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let loop_filter_across_tiles_enabled_flag: u32 = + unsafe { ::std::mem::transmute(loop_filter_across_tiles_enabled_flag) }; + loop_filter_across_tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let pps_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::std::mem::transmute(pps_loop_filter_across_slices_enabled_flag) }; + pps_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let deblocking_filter_control_present_flag: u32 = + unsafe { ::std::mem::transmute(deblocking_filter_control_present_flag) }; + deblocking_filter_control_present_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let deblocking_filter_override_enabled_flag: u32 = + unsafe { ::std::mem::transmute(deblocking_filter_override_enabled_flag) }; + deblocking_filter_override_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let pps_deblocking_filter_disabled_flag: u32 = + unsafe { ::std::mem::transmute(pps_deblocking_filter_disabled_flag) }; + pps_deblocking_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let pps_scaling_list_data_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_scaling_list_data_present_flag) }; + pps_scaling_list_data_present_flag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let lists_modification_present_flag: u32 = + unsafe { ::std::mem::transmute(lists_modification_present_flag) }; + lists_modification_present_flag as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let slice_segment_header_extension_present_flag: u32 = + unsafe { ::std::mem::transmute(slice_segment_header_extension_present_flag) }; + slice_segment_header_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let pps_extension_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_extension_present_flag) }; + pps_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let cross_component_prediction_enabled_flag: u32 = + unsafe { ::std::mem::transmute(cross_component_prediction_enabled_flag) }; + cross_component_prediction_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let chroma_qp_offset_list_enabled_flag: u32 = + unsafe { ::std::mem::transmute(chroma_qp_offset_list_enabled_flag) }; + chroma_qp_offset_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let pps_curr_pic_ref_enabled_flag: u32 = + unsafe { ::std::mem::transmute(pps_curr_pic_ref_enabled_flag) }; + pps_curr_pic_ref_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let residual_adaptive_colour_transform_enabled_flag: u32 = + unsafe { ::std::mem::transmute(residual_adaptive_colour_transform_enabled_flag) }; + residual_adaptive_colour_transform_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let pps_slice_act_qp_offsets_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_slice_act_qp_offsets_present_flag) }; + pps_slice_act_qp_offsets_present_flag as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let pps_palette_predictor_initializer_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_palette_predictor_initializer_present_flag) }; + pps_palette_predictor_initializer_present_flag as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let monochrome_palette_flag: u32 = + unsafe { ::std::mem::transmute(monochrome_palette_flag) }; + monochrome_palette_flag as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let pps_range_extension_flag: u32 = + unsafe { ::std::mem::transmute(pps_range_extension_flag) }; + pps_range_extension_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PictureParameterSet { + pub pps_pic_parameter_set_id: u8, + pub pps_seq_parameter_set_id: u8, + pub num_extra_slice_header_bits: u8, + pub num_ref_idx_l0_default_active_minus1: u8, + pub num_ref_idx_l1_default_active_minus1: u8, + pub init_qp_minus26: i8, + pub diff_cu_qp_delta_depth: u8, + pub pps_cb_qp_offset: i8, + pub pps_cr_qp_offset: i8, + pub num_tile_columns_minus1: u8, + pub num_tile_rows_minus1: u8, + pub column_width_minus1: [u16; 19usize], + pub row_height_minus1: [u16; 21usize], + pub pps_beta_offset_div2: i8, + pub pps_tc_offset_div2: i8, + pub log2_parallel_merge_level_minus2: u8, + pub flags: StdVideoH265PpsFlags, + pub pScalingLists: *mut StdVideoH265ScalingLists, + pub log2_max_transform_skip_block_size_minus2: u8, + pub diff_cu_chroma_qp_offset_depth: u8, + pub chroma_qp_offset_list_len_minus1: u8, + pub cb_qp_offset_list: [i8; 6usize], + pub cr_qp_offset_list: [i8; 6usize], + pub log2_sao_offset_scale_luma: u8, + pub log2_sao_offset_scale_chroma: u8, + pub pps_act_y_qp_offset_plus5: i8, + pub pps_act_cb_qp_offset_plus5: i8, + pub pps_act_cr_qp_offset_plus5: i8, + pub pps_num_palette_predictor_initializer: u8, + pub luma_bit_depth_entry_minus8: u8, + pub chroma_bit_depth_entry_minus8: u8, + pub pPredictorPaletteEntries: *mut StdVideoH265PredictorPaletteEntries, +} +#[test] +fn bindgen_test_layout_StdVideoH265PictureParameterSet() { + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!("Size of: ", stringify!(StdVideoH265PictureParameterSet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(StdVideoH265PictureParameterSet)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pps_pic_parameter_set_id + as *const _ as usize + }, + 0usize, + 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 + }, + 1usize, + 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 + }, + 2usize, + 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 + }, + 3usize, + 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 + }, + 4usize, + 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 + }, + 5usize, + 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 + }, + 6usize, + 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 + }, + 7usize, + 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 + }, + 8usize, + 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 + }, + 9usize, + 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 + }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(num_tile_rows_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).column_width_minus1 + as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(column_width_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).row_height_minus1 + as *const _ as usize + }, + 50usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(row_height_minus1) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pps_beta_offset_div2 + as *const _ as usize + }, + 92usize, + 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 + }, + 93usize, + 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 + }, + 94usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(log2_parallel_merge_level_minus2) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(StdVideoH265PictureParameterSet), + "::", + stringify!(flags) + ) + ); + 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) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH265PictureInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoDecodeH265PictureInfoFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH265PictureInfoFlags) + ) + ); +} +impl StdVideoDecodeH265PictureInfoFlags { + #[inline] + pub fn IrapPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_IrapPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn IdrPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_IdrPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn IsReference(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_IsReference(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn short_term_ref_pic_set_sps_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_short_term_ref_pic_set_sps_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + IrapPicFlag: u32, + IdrPicFlag: u32, + IsReference: u32, + short_term_ref_pic_set_sps_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let IrapPicFlag: u32 = unsafe { ::std::mem::transmute(IrapPicFlag) }; + IrapPicFlag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let IdrPicFlag: u32 = unsafe { ::std::mem::transmute(IdrPicFlag) }; + IdrPicFlag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let IsReference: u32 = unsafe { ::std::mem::transmute(IsReference) }; + IsReference as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let short_term_ref_pic_set_sps_flag: u32 = + unsafe { ::std::mem::transmute(short_term_ref_pic_set_sps_flag) }; + short_term_ref_pic_set_sps_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265PictureInfo { + pub vps_video_parameter_set_id: u8, + pub sps_seq_parameter_set_id: u8, + pub pps_pic_parameter_set_id: u8, + pub num_short_term_ref_pic_sets: u8, + pub PicOrderCntVal: i32, + pub NumBitsForSTRefPicSetInSlice: u16, + pub NumDeltaPocsOfRefRpsIdx: u8, + pub RefPicSetStCurrBefore: [u8; 8usize], + pub RefPicSetStCurrAfter: [u8; 8usize], + pub RefPicSetLtCurr: [u8; 8usize], + pub flags: StdVideoDecodeH265PictureInfoFlags, +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH265PictureInfo() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(StdVideoDecodeH265PictureInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoDecodeH265PictureInfo)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).vps_video_parameter_set_id + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(vps_video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sps_seq_parameter_set_id + as *const _ as usize + }, + 1usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(sps_seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pps_pic_parameter_set_id + as *const _ as usize + }, + 2usize, + 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 + }, + 3usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(num_short_term_ref_pic_sets) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).PicOrderCntVal as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(PicOrderCntVal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).NumBitsForSTRefPicSetInSlice + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(NumBitsForSTRefPicSetInSlice) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).NumDeltaPocsOfRefRpsIdx + as *const _ as usize + }, + 10usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(NumDeltaPocsOfRefRpsIdx) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).RefPicSetStCurrBefore + as *const _ as usize + }, + 11usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(RefPicSetStCurrBefore) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).RefPicSetStCurrAfter + as *const _ as usize + }, + 19usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(RefPicSetStCurrAfter) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).RefPicSetLtCurr as *const _ + as usize + }, + 27usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(RefPicSetLtCurr) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265PictureInfo), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265ReferenceInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH265ReferenceInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(StdVideoDecodeH265ReferenceInfoFlags) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoDecodeH265ReferenceInfoFlags) + ) + ); +} +impl StdVideoDecodeH265ReferenceInfoFlags { + #[inline] + pub fn is_long_term(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_long_term(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_non_existing(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_non_existing(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + is_long_term: u32, + is_non_existing: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let is_long_term: u32 = unsafe { ::std::mem::transmute(is_long_term) }; + is_long_term as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_non_existing: u32 = unsafe { ::std::mem::transmute(is_non_existing) }; + is_non_existing as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265ReferenceInfo { + pub PicOrderCntVal: i32, + pub flags: StdVideoDecodeH265ReferenceInfoFlags, +} +#[test] +fn bindgen_test_layout_StdVideoDecodeH265ReferenceInfo() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(StdVideoDecodeH265ReferenceInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoDecodeH265ReferenceInfo)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).PicOrderCntVal as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265ReferenceInfo), + "::", + stringify!(PicOrderCntVal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoDecodeH265ReferenceInfo), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264SliceHeaderFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264SliceHeaderFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264SliceHeaderFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoEncodeH264SliceHeaderFlags) + ) + ); +} +impl StdVideoEncodeH264SliceHeaderFlags { + #[inline] + pub fn idr_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_idr_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_reference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_reference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn num_ref_idx_active_override_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_num_ref_idx_active_override_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn no_output_of_prior_pics_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_output_of_prior_pics_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn long_term_reference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_reference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn adaptive_ref_pic_marking_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_adaptive_ref_pic_marking_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn no_prior_references_available_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_prior_references_available_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + idr_flag: u32, + is_reference_flag: u32, + num_ref_idx_active_override_flag: u32, + no_output_of_prior_pics_flag: u32, + long_term_reference_flag: u32, + adaptive_ref_pic_marking_mode_flag: u32, + no_prior_references_available_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let idr_flag: u32 = unsafe { ::std::mem::transmute(idr_flag) }; + idr_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_reference_flag: u32 = unsafe { ::std::mem::transmute(is_reference_flag) }; + is_reference_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let num_ref_idx_active_override_flag: u32 = + unsafe { ::std::mem::transmute(num_ref_idx_active_override_flag) }; + num_ref_idx_active_override_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let no_output_of_prior_pics_flag: u32 = + unsafe { ::std::mem::transmute(no_output_of_prior_pics_flag) }; + no_output_of_prior_pics_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let long_term_reference_flag: u32 = + unsafe { ::std::mem::transmute(long_term_reference_flag) }; + long_term_reference_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let adaptive_ref_pic_marking_mode_flag: u32 = + unsafe { ::std::mem::transmute(adaptive_ref_pic_marking_mode_flag) }; + adaptive_ref_pic_marking_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let no_prior_references_available_flag: u32 = + unsafe { ::std::mem::transmute(no_prior_references_available_flag) }; + no_prior_references_available_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264PictureInfoFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264PictureInfoFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(StdVideoEncodeH264PictureInfoFlags) + ) + ); +} +impl StdVideoEncodeH264PictureInfoFlags { + #[inline] + pub fn idr_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_idr_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_reference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_reference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn long_term_reference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_reference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + idr_flag: u32, + is_reference_flag: u32, + long_term_reference_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let idr_flag: u32 = unsafe { ::std::mem::transmute(idr_flag) }; + idr_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_reference_flag: u32 = unsafe { ::std::mem::transmute(is_reference_flag) }; + is_reference_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let long_term_reference_flag: u32 = + unsafe { ::std::mem::transmute(long_term_reference_flag) }; + long_term_reference_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264RefMgmtFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264RefMgmtFlags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264RefMgmtFlags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(StdVideoEncodeH264RefMgmtFlags)) + ); +} +impl StdVideoEncodeH264RefMgmtFlags { + #[inline] + pub fn ref_pic_list_modification_l0_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_pic_list_modification_l0_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn ref_pic_list_modification_l1_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_pic_list_modification_l1_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + ref_pic_list_modification_l0_flag: u32, + ref_pic_list_modification_l1_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let ref_pic_list_modification_l0_flag: u32 = + unsafe { ::std::mem::transmute(ref_pic_list_modification_l0_flag) }; + ref_pic_list_modification_l0_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let ref_pic_list_modification_l1_flag: u32 = + unsafe { ::std::mem::transmute(ref_pic_list_modification_l1_flag) }; + ref_pic_list_modification_l1_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264RefListModEntry { + pub modification_of_pic_nums_idc: StdVideoH264ModificationOfPicNumsIdc, + pub abs_diff_pic_num_minus1: u16, + pub long_term_pic_num: u16, +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264RefListModEntry() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264RefListModEntry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + 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) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264RefPicMarkingEntry { + pub operation: StdVideoH264MemMgmtControlOp, + pub difference_of_pic_nums_minus1: u16, + pub long_term_pic_num: u16, + pub long_term_frame_idx: u16, + pub max_long_term_frame_idx_plus1: u16, +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264RefPicMarkingEntry() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!( + "Size of: ", + stringify!(StdVideoEncodeH264RefPicMarkingEntry) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + 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) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264RefMemMgmtCtrlOperations { + pub flags: StdVideoEncodeH264RefMgmtFlags, + pub refList0ModOpCount: u8, + pub pRefList0ModOperations: *mut StdVideoEncodeH264RefListModEntry, + pub refList1ModOpCount: u8, + pub pRefList1ModOperations: *mut StdVideoEncodeH264RefListModEntry, + pub refPicMarkingOpCount: u8, + pub pRefPicMarkingOperations: *mut StdVideoEncodeH264RefPicMarkingEntry, +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264RefMemMgmtCtrlOperations() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!( + "Size of: ", + stringify!(StdVideoEncodeH264RefMemMgmtCtrlOperations) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + 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) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264PictureInfo { + pub flags: StdVideoEncodeH264PictureInfoFlags, + pub pictureType: StdVideoH264PictureType, + pub frameNum: u32, + pub pictureOrderCount: u32, + pub long_term_pic_num: u16, + pub long_term_frame_idx: u16, +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264PictureInfo() { + assert_eq!( + ::std::mem::size_of::(), + 20usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264PictureInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 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::())).pictureType as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(pictureType) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).frameNum as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(frameNum) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pictureOrderCount as *const _ + as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(pictureOrderCount) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).long_term_pic_num as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(long_term_pic_num) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).long_term_frame_idx + as *const _ as usize + }, + 18usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264PictureInfo), + "::", + stringify!(long_term_frame_idx) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264SliceHeader { + pub flags: StdVideoEncodeH264SliceHeaderFlags, + pub slice_type: StdVideoH264SliceType, + pub seq_parameter_set_id: u8, + pub pic_parameter_set_id: u8, + pub idr_pic_id: u16, + pub num_ref_idx_l0_active_minus1: u8, + pub num_ref_idx_l1_active_minus1: u8, + pub cabac_init_idc: StdVideoH264CabacInitIdc, + pub disable_deblocking_filter_idc: StdVideoH264DisableDeblockingFilterIdc, + pub slice_alpha_c0_offset_div2: i8, + pub slice_beta_offset_div2: i8, + pub pMemMgmtCtrlOperations: *mut StdVideoEncodeH264RefMemMgmtCtrlOperations, +} +#[test] +fn bindgen_test_layout_StdVideoEncodeH264SliceHeader() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(StdVideoEncodeH264SliceHeader)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(StdVideoEncodeH264SliceHeader)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flags as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).slice_type as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(slice_type) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).seq_parameter_set_id + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pic_parameter_set_id + as *const _ as usize + }, + 9usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).idr_pic_id as *const _ + as usize + }, + 10usize, + 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 + }, + 12usize, + 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 + }, + 13usize, + 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::())).pMemMgmtCtrlOperations + as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(StdVideoEncodeH264SliceHeader), + "::", + stringify!(pMemMgmtCtrlOperations) + ) + ); +} diff --git a/examples/src/lib.rs b/examples/src/lib.rs index bea1913..1eef4a7 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -225,7 +225,7 @@ impl ExampleBase { .application_version(0) .engine_name(&app_name) .engine_version(0) - .api_version(vk::make_version(1, 0, 0)); + .api_version(vk::make_api_version(0, 1, 0, 0)); let create_info = vk::InstanceCreateInfo::builder() .application_info(&appinfo) diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 80ea541..5f66095 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -5,6 +5,7 @@ authors = ["Maik Klein "] edition = "2018" [dependencies] +bindgen = "0.58" heck = "0.3" itertools = "0.10" nom = "6.0" diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index e1d8c49..f5ac258 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit e1d8c4931d8e4b6c4a8e633c163ed3aa82d6ac1c +Subproject commit f5ac258209dc535973aa527bf3c11ba7063ba1b0 diff --git a/generator/src/bin/generator.rs b/generator/src/bin/generator.rs index 4670818..e9fde6a 100644 --- a/generator/src/bin/generator.rs +++ b/generator/src/bin/generator.rs @@ -4,11 +4,8 @@ use std::path::Path; fn main() { let cwd = std::env::current_dir().unwrap(); if cwd.ends_with("generator") { - write_source_code(Path::new("Vulkan-Headers/registry/vk.xml"), "../ash/src"); + write_source_code(Path::new("Vulkan-Headers"), "../ash/src"); } else { - write_source_code( - Path::new("generator/Vulkan-Headers/registry/vk.xml"), - "ash/src", - ); + write_source_code(Path::new("generator/Vulkan-Headers"), "ash/src"); } } diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 88f2673..c33722a 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -3,9 +3,10 @@ use heck::{CamelCase, ShoutySnakeCase, SnakeCase}; use itertools::Itertools; use nom::{ - alt, - character::complete::{digit1, hex_digit1}, - complete, delimited, do_parse, map, named, one_of, opt, pair, preceded, tag, terminated, value, + alt, char, + character::complete::{digit1, hex_digit1, multispace1}, + complete, delimited, do_parse, many1, map, named, none_of, one_of, opt, pair, preceded, tag, + terminated, value, }; use once_cell::sync::Lazy; use proc_macro2::{Delimiter, Group, Literal, Span, TokenStream, TokenTree}; @@ -106,6 +107,23 @@ named!(cfloat<&str, f32>, terminated!(nom::number::complete::float, one_of!("fF")) ); +// Like a C string, but does not support quote escaping and expects at least one character. +// If needed, use https://github.com/Geal/nom/blob/8e09f0c3029d32421b5b69fb798cef6855d0c8df/tests/json.rs#L61-L81 +named!(c_include_string<&str, String>, + delimited!( + char!('"'), + map!( + many1!(none_of!("\"")), + |chars| chars.iter().map(char::to_string).join("") + ), + char!('"') + ) +); + +named!(c_include<&str, String>, + preceded!(tag!("#include"), preceded!(multispace1, c_include_string)) +); + fn khronos_link(name: &S) -> Literal { Literal::string(&format!( "", @@ -1376,6 +1394,14 @@ pub fn variant_ident(enum_name: &str, variant_name: &str) -> Ident { .unwrap_or_else(|| { if enum_name == "VkResult" || is_enum_variant_with_typo(variant_name) { variant_name.strip_prefix("VK").unwrap() + } else if variant_name == "VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY" { + // https://github.com/KhronosGroup/Vulkan-Docs/issues/1531 + "_PROGRESSIVE_PICTURES_ONLY" + } else if struct_name == "VK_VIDEO_ENCODE_H264_CAPABILITIES" { + // https://github.com/KhronosGroup/Vulkan-Docs/issues/1531 + variant_name + .strip_prefix("VK_VIDEO_ENCODE_H264_CAPABILITY") + .unwrap() } else { panic!( "Failed to strip {} prefix from enum variant {}", @@ -1951,7 +1977,7 @@ pub fn derive_setters( }) }); - let extends_name = name_to_tokens(&format!("Extends{}", name)); + let extends_name = format_ident!("Extends{}", name); let root_structs: Vec = _struct .extends @@ -1960,13 +1986,15 @@ pub fn derive_setters( extends .split(',') .filter(|extend| root_struct_names.contains(*extend)) - .map(|extends| name_to_tokens(&format!("Extends{}", name_to_tokens(&extends)))) + .map(|extends| format_ident!("Extends{}", name_to_tokens(extends))) .collect() }) .unwrap_or_else(Vec::new); + let is_root_struct = has_next && root_structs.is_empty(); + // We only implement a next methods for root structs with a `pnext` field. - let next_function = if has_next && root_structs.is_empty() { + let next_function = if is_root_struct { quote! { /// Prepends the given extension struct between the root and the first pointer. This /// method only exists on structs that can be passed to a function directly. Only @@ -1993,27 +2021,22 @@ pub fn derive_setters( } } } else { - quote! {} + quote!() }; - // Root structs come with their own trait that structs that extends this struct will - // implement - let next_trait = if has_next && _struct.extends.is_none() { - quote! { - pub unsafe trait #extends_name { - } - } + // Root structs come with their own trait that structs that extend + // this struct will implement + let next_trait = if is_root_struct { + quote!(pub unsafe trait #extends_name {}) } else { - quote! {} + quote!() }; // If the struct extends something we need to implement the trait. let impl_extend_trait = root_structs.iter().map(|extends| { quote! { - unsafe impl #extends for #name_builder<'_> { - } - unsafe impl #extends for #name { - } + unsafe impl #extends for #name_builder<'_> {} + unsafe impl #extends for #name {} } }); @@ -2488,6 +2511,62 @@ pub fn generate_const_debugs(const_values: &BTreeMap) - #(#impls)* } } +pub fn extract_native_types(registry: &vk_parse::Registry) -> (Vec<(String, String)>, Vec) { + // Not a HashMap so that headers are processed in order of definition: + let mut header_includes = vec![]; + let mut header_types = vec![]; + + let types = registry + .0 + .iter() + .filter_map(|item| match item { + vk_parse::RegistryChild::Types(ref ty) => { + Some(ty.children.iter().filter_map(|child| match child { + vk_parse::TypesChild::Type(ty) => Some(ty), + _ => None, + })) + } + _ => None, + }) + .flatten(); + + for ty in types { + match ty.category.as_deref() { + Some("include") => { + // `category="include"` lacking an `#include` directive are generally "irrelevant" system headers. + if let vk_parse::TypeSpec::Code(code) = &ty.spec { + let name = ty + .name + .clone() + .expect("Include type must provide header name"); + assert!( + header_includes + .iter() + .all(|(other_name, _)| other_name != &name), + "Header `{}` being redefined", + name + ); + + let (rem, path) = c_include(&code.code) + .expect("Failed to parse `#include` from `category=\"include\"` directive"); + assert!(rem.is_empty()); + header_includes.push((name, path)); + } + } + Some(_) => {} + None => { + if let Some(header_name) = ty.requires.clone() { + if header_includes.iter().any(|(name, _)| name == &header_name) { + // Omit types from system and other headers + header_types.push(ty.name.clone().expect("Type must have a name")); + } + } + } + }; + } + + (header_includes, header_types) +} pub fn generate_aliases_of_types( types: &vk_parse::Types, ty_cache: &mut HashSet, @@ -2514,10 +2593,11 @@ pub fn generate_aliases_of_types( #(#aliases)* } } -pub fn write_source_code>(vk_xml: &Path, src_dir: P) { +pub fn write_source_code>(vk_headers_dir: &Path, src_dir: P) { + let vk_xml = vk_headers_dir.join("registry/vk.xml"); use std::fs::File; use std::io::Write; - let (spec2, _errors) = vk_parse::parse_file(vk_xml).expect("Invalid xml file"); + let (spec2, _errors) = vk_parse::parse_file(&vk_xml).expect("Invalid xml file"); let extensions: &Vec = spec2 .0 .iter() @@ -2539,7 +2619,7 @@ pub fn write_source_code>(vk_xml: &Path, src_dir: P) { }) .collect(); - let spec = vk_parse::parse_file_as_vkxml(vk_xml).expect("Invalid xml file."); + let spec = vk_parse::parse_file_as_vkxml(&vk_xml).expect("Invalid xml file."); let cmd_aliases: HashMap = spec2 .0 .iter() @@ -2738,11 +2818,12 @@ pub fn write_source_code>(vk_xml: &Path, src_dir: P) { use std::fmt; use std::os::raw::*; use crate::vk::{Handle, ptr_chain_iter}; - use crate::vk::platform_types::*; use crate::vk::aliases::*; use crate::vk::bitflags::*; use crate::vk::constants::*; use crate::vk::enums::*; + use crate::vk::native::*; + use crate::vk::platform_types::*; #(#definition_code)* }; @@ -2820,6 +2901,9 @@ pub fn write_source_code>(vk_xml: &Path, src_dir: P) { pub use feature_extensions::*; mod features; pub use features::*; + /// Native bindings from Vulkan headers, generated by bindgen + #[allow(nonstandard_style)] + pub mod native; mod platform_types; pub use platform_types::*; @@ -2852,4 +2936,41 @@ pub fn write_source_code>(vk_xml: &Path, src_dir: P) { write!(&mut vk_aliases_file, "{}", aliases).expect("Unable to write vk/aliases.rs"); write!(&mut vk_rs_file, "{} {}", vk_rs_clippy_lints, vk_rs_code) .expect("Unable to write vk.rs"); + + let vk_include = vk_headers_dir.join("include"); + + let mut bindings = bindgen::Builder::default() + .clang_arg(format!( + "-I{}", + vk_include.to_str().expect("Valid UTF8 string") + )) + .clang_arg(format!( + "-I{}", + vk_include + .join("vulkan") + .to_str() + .expect("Valid UTF8 string") + )); + + let (header_includes, header_types) = extract_native_types(&spec2); + + for (_name, path) in header_includes { + let path = if path == "vk_platform.h" { + // Fix broken path, https://github.com/KhronosGroup/Vulkan-Docs/pull/1538 + vk_include.join("vulkan").join(path) + } else { + vk_include.join(path) + }; + bindings = bindings.header(path.to_str().expect("Valid UTF8 string")); + } + + for typ in header_types { + bindings = bindings.allowlist_type(typ); + } + + bindings + .generate() + .expect("Unable to generate native bindings") + .write_to_file(vk_dir.join("native.rs")) + .expect("Couldn't write native bindings!"); }