#![allow(unused_imports)]
use crate::{vk::Result as VkResult, vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::mem::transmute;
use core::ptr;
pub const EXTENSION_NAME: &CStr = c"VK_KHR_video_encode_av1";
pub(super) mod defs {
#![allow(non_camel_case_types, unused_imports)]
use crate::{vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::fmt;
use core::marker::PhantomData;
use core::ptr;
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1CapabilitiesKHR<'a> {
pub s_type: StructureType,
pub p_next: *mut c_void,
pub flags: VideoEncodeAV1CapabilityFlagsKHR,
pub max_level: StdVideoAV1Level,
pub coded_picture_alignment: Extent2D,
pub max_tiles: Extent2D,
pub min_tile_size: Extent2D,
pub max_tile_size: Extent2D,
pub superblock_sizes: VideoEncodeAV1SuperblockSizeFlagsKHR,
pub max_single_reference_count: u32,
pub single_reference_name_mask: u32,
pub max_unidirectional_compound_reference_count: u32,
pub max_unidirectional_compound_group1_reference_count: u32,
pub unidirectional_compound_reference_name_mask: u32,
pub max_bidirectional_compound_reference_count: u32,
pub max_bidirectional_compound_group1_reference_count: u32,
pub max_bidirectional_compound_group2_reference_count: u32,
pub bidirectional_compound_reference_name_mask: u32,
pub max_temporal_layer_count: u32,
pub max_spatial_layer_count: u32,
pub max_operating_points: u32,
pub min_q_index: u32,
pub max_q_index: u32,
pub prefers_gop_remaining_frames: Bool32,
pub requires_gop_remaining_frames: Bool32,
pub std_syntax_flags: VideoEncodeAV1StdFlagsKHR,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1CapabilitiesKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1CapabilitiesKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("flags", &self.flags)
.field("max_level", &self.max_level)
.field("coded_picture_alignment", &self.coded_picture_alignment)
.field("max_tiles", &self.max_tiles)
.field("min_tile_size", &self.min_tile_size)
.field("max_tile_size", &self.max_tile_size)
.field("superblock_sizes", &self.superblock_sizes)
.field(
"max_single_reference_count",
&self.max_single_reference_count,
)
.field(
"single_reference_name_mask",
&self.single_reference_name_mask,
)
.field(
"max_unidirectional_compound_reference_count",
&self.max_unidirectional_compound_reference_count,
)
.field(
"max_unidirectional_compound_group1_reference_count",
&self.max_unidirectional_compound_group1_reference_count,
)
.field(
"unidirectional_compound_reference_name_mask",
&self.unidirectional_compound_reference_name_mask,
)
.field(
"max_bidirectional_compound_reference_count",
&self.max_bidirectional_compound_reference_count,
)
.field(
"max_bidirectional_compound_group1_reference_count",
&self.max_bidirectional_compound_group1_reference_count,
)
.field(
"max_bidirectional_compound_group2_reference_count",
&self.max_bidirectional_compound_group2_reference_count,
)
.field(
"bidirectional_compound_reference_name_mask",
&self.bidirectional_compound_reference_name_mask,
)
.field("max_temporal_layer_count", &self.max_temporal_layer_count)
.field("max_spatial_layer_count", &self.max_spatial_layer_count)
.field("max_operating_points", &self.max_operating_points)
.field("min_q_index", &self.min_q_index)
.field("max_q_index", &self.max_q_index)
.field(
"prefers_gop_remaining_frames",
&self.prefers_gop_remaining_frames,
)
.field(
"requires_gop_remaining_frames",
&self.requires_gop_remaining_frames,
)
.field("std_syntax_flags", &self.std_syntax_flags)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1CapabilitiesKHR<'a> {
const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_AV1_CAPABILITIES_KHR;
}
unsafe impl Extends<VideoCapabilitiesKHR<'_>> for VideoEncodeAV1CapabilitiesKHR<'_> {}
impl Default for VideoEncodeAV1CapabilitiesKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null_mut(),
flags: Default::default(),
max_level: Default::default(),
coded_picture_alignment: Default::default(),
max_tiles: Default::default(),
min_tile_size: Default::default(),
max_tile_size: Default::default(),
superblock_sizes: Default::default(),
max_single_reference_count: Default::default(),
single_reference_name_mask: Default::default(),
max_unidirectional_compound_reference_count: Default::default(),
max_unidirectional_compound_group1_reference_count: Default::default(),
unidirectional_compound_reference_name_mask: Default::default(),
max_bidirectional_compound_reference_count: Default::default(),
max_bidirectional_compound_group1_reference_count: Default::default(),
max_bidirectional_compound_group2_reference_count: Default::default(),
bidirectional_compound_reference_name_mask: Default::default(),
max_temporal_layer_count: Default::default(),
max_spatial_layer_count: Default::default(),
max_operating_points: Default::default(),
min_q_index: Default::default(),
max_q_index: Default::default(),
prefers_gop_remaining_frames: Default::default(),
requires_gop_remaining_frames: Default::default(),
std_syntax_flags: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1CapabilitiesKHR<'a> {
#[inline]
pub fn flags(mut self, flags: VideoEncodeAV1CapabilityFlagsKHR) -> Self {
self.flags = flags;
self
}
#[inline]
pub fn max_level(mut self, max_level: StdVideoAV1Level) -> Self {
self.max_level = max_level;
self
}
#[inline]
pub fn coded_picture_alignment(mut self, coded_picture_alignment: Extent2D) -> Self {
self.coded_picture_alignment = coded_picture_alignment;
self
}
#[inline]
pub fn max_tiles(mut self, max_tiles: Extent2D) -> Self {
self.max_tiles = max_tiles;
self
}
#[inline]
pub fn min_tile_size(mut self, min_tile_size: Extent2D) -> Self {
self.min_tile_size = min_tile_size;
self
}
#[inline]
pub fn max_tile_size(mut self, max_tile_size: Extent2D) -> Self {
self.max_tile_size = max_tile_size;
self
}
#[inline]
pub fn superblock_sizes(
mut self,
superblock_sizes: VideoEncodeAV1SuperblockSizeFlagsKHR,
) -> Self {
self.superblock_sizes = superblock_sizes;
self
}
#[inline]
pub fn max_single_reference_count(mut self, max_single_reference_count: u32) -> Self {
self.max_single_reference_count = max_single_reference_count;
self
}
#[inline]
pub fn single_reference_name_mask(mut self, single_reference_name_mask: u32) -> Self {
self.single_reference_name_mask = single_reference_name_mask;
self
}
#[inline]
pub fn max_unidirectional_compound_reference_count(
mut self,
max_unidirectional_compound_reference_count: u32,
) -> Self {
self.max_unidirectional_compound_reference_count =
max_unidirectional_compound_reference_count;
self
}
#[inline]
pub fn max_unidirectional_compound_group1_reference_count(
mut self,
max_unidirectional_compound_group1_reference_count: u32,
) -> Self {
self.max_unidirectional_compound_group1_reference_count =
max_unidirectional_compound_group1_reference_count;
self
}
#[inline]
pub fn unidirectional_compound_reference_name_mask(
mut self,
unidirectional_compound_reference_name_mask: u32,
) -> Self {
self.unidirectional_compound_reference_name_mask =
unidirectional_compound_reference_name_mask;
self
}
#[inline]
pub fn max_bidirectional_compound_reference_count(
mut self,
max_bidirectional_compound_reference_count: u32,
) -> Self {
self.max_bidirectional_compound_reference_count =
max_bidirectional_compound_reference_count;
self
}
#[inline]
pub fn max_bidirectional_compound_group1_reference_count(
mut self,
max_bidirectional_compound_group1_reference_count: u32,
) -> Self {
self.max_bidirectional_compound_group1_reference_count =
max_bidirectional_compound_group1_reference_count;
self
}
#[inline]
pub fn max_bidirectional_compound_group2_reference_count(
mut self,
max_bidirectional_compound_group2_reference_count: u32,
) -> Self {
self.max_bidirectional_compound_group2_reference_count =
max_bidirectional_compound_group2_reference_count;
self
}
#[inline]
pub fn bidirectional_compound_reference_name_mask(
mut self,
bidirectional_compound_reference_name_mask: u32,
) -> Self {
self.bidirectional_compound_reference_name_mask =
bidirectional_compound_reference_name_mask;
self
}
#[inline]
pub fn max_temporal_layer_count(mut self, max_temporal_layer_count: u32) -> Self {
self.max_temporal_layer_count = max_temporal_layer_count;
self
}
#[inline]
pub fn max_spatial_layer_count(mut self, max_spatial_layer_count: u32) -> Self {
self.max_spatial_layer_count = max_spatial_layer_count;
self
}
#[inline]
pub fn max_operating_points(mut self, max_operating_points: u32) -> Self {
self.max_operating_points = max_operating_points;
self
}
#[inline]
pub fn min_q_index(mut self, min_q_index: u32) -> Self {
self.min_q_index = min_q_index;
self
}
#[inline]
pub fn max_q_index(mut self, max_q_index: u32) -> Self {
self.max_q_index = max_q_index;
self
}
#[inline]
pub fn prefers_gop_remaining_frames(mut self, prefers_gop_remaining_frames: bool) -> Self {
self.prefers_gop_remaining_frames = prefers_gop_remaining_frames.into();
self
}
#[inline]
pub fn requires_gop_remaining_frames(
mut self,
requires_gop_remaining_frames: bool,
) -> Self {
self.requires_gop_remaining_frames = requires_gop_remaining_frames.into();
self
}
#[inline]
pub fn std_syntax_flags(mut self, std_syntax_flags: VideoEncodeAV1StdFlagsKHR) -> Self {
self.std_syntax_flags = std_syntax_flags;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1QualityLevelPropertiesKHR<'a> {
pub s_type: StructureType,
pub p_next: *mut c_void,
pub preferred_rate_control_flags: VideoEncodeAV1RateControlFlagsKHR,
pub preferred_gop_frame_count: u32,
pub preferred_key_frame_period: u32,
pub preferred_consecutive_bipredictive_frame_count: u32,
pub preferred_temporal_layer_count: u32,
pub preferred_constant_q_index: VideoEncodeAV1QIndexKHR,
pub preferred_max_single_reference_count: u32,
pub preferred_single_reference_name_mask: u32,
pub preferred_max_unidirectional_compound_reference_count: u32,
pub preferred_max_unidirectional_compound_group1_reference_count: u32,
pub preferred_unidirectional_compound_reference_name_mask: u32,
pub preferred_max_bidirectional_compound_reference_count: u32,
pub preferred_max_bidirectional_compound_group1_reference_count: u32,
pub preferred_max_bidirectional_compound_group2_reference_count: u32,
pub preferred_bidirectional_compound_reference_name_mask: u32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1QualityLevelPropertiesKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1QualityLevelPropertiesKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field(
"preferred_rate_control_flags",
&self.preferred_rate_control_flags,
)
.field("preferred_gop_frame_count", &self.preferred_gop_frame_count)
.field(
"preferred_key_frame_period",
&self.preferred_key_frame_period,
)
.field(
"preferred_consecutive_bipredictive_frame_count",
&self.preferred_consecutive_bipredictive_frame_count,
)
.field(
"preferred_temporal_layer_count",
&self.preferred_temporal_layer_count,
)
.field(
"preferred_constant_q_index",
&self.preferred_constant_q_index,
)
.field(
"preferred_max_single_reference_count",
&self.preferred_max_single_reference_count,
)
.field(
"preferred_single_reference_name_mask",
&self.preferred_single_reference_name_mask,
)
.field(
"preferred_max_unidirectional_compound_reference_count",
&self.preferred_max_unidirectional_compound_reference_count,
)
.field(
"preferred_max_unidirectional_compound_group1_reference_count",
&self.preferred_max_unidirectional_compound_group1_reference_count,
)
.field(
"preferred_unidirectional_compound_reference_name_mask",
&self.preferred_unidirectional_compound_reference_name_mask,
)
.field(
"preferred_max_bidirectional_compound_reference_count",
&self.preferred_max_bidirectional_compound_reference_count,
)
.field(
"preferred_max_bidirectional_compound_group1_reference_count",
&self.preferred_max_bidirectional_compound_group1_reference_count,
)
.field(
"preferred_max_bidirectional_compound_group2_reference_count",
&self.preferred_max_bidirectional_compound_group2_reference_count,
)
.field(
"preferred_bidirectional_compound_reference_name_mask",
&self.preferred_bidirectional_compound_reference_name_mask,
)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1QualityLevelPropertiesKHR<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR;
}
unsafe impl Extends<VideoEncodeQualityLevelPropertiesKHR<'_>>
for VideoEncodeAV1QualityLevelPropertiesKHR<'_>
{
}
impl Default for VideoEncodeAV1QualityLevelPropertiesKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null_mut(),
preferred_rate_control_flags: Default::default(),
preferred_gop_frame_count: Default::default(),
preferred_key_frame_period: Default::default(),
preferred_consecutive_bipredictive_frame_count: Default::default(),
preferred_temporal_layer_count: Default::default(),
preferred_constant_q_index: Default::default(),
preferred_max_single_reference_count: Default::default(),
preferred_single_reference_name_mask: Default::default(),
preferred_max_unidirectional_compound_reference_count: Default::default(),
preferred_max_unidirectional_compound_group1_reference_count: Default::default(),
preferred_unidirectional_compound_reference_name_mask: Default::default(),
preferred_max_bidirectional_compound_reference_count: Default::default(),
preferred_max_bidirectional_compound_group1_reference_count: Default::default(),
preferred_max_bidirectional_compound_group2_reference_count: Default::default(),
preferred_bidirectional_compound_reference_name_mask: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1QualityLevelPropertiesKHR<'a> {
#[inline]
pub fn preferred_rate_control_flags(
mut self,
preferred_rate_control_flags: VideoEncodeAV1RateControlFlagsKHR,
) -> Self {
self.preferred_rate_control_flags = preferred_rate_control_flags;
self
}
#[inline]
pub fn preferred_gop_frame_count(mut self, preferred_gop_frame_count: u32) -> Self {
self.preferred_gop_frame_count = preferred_gop_frame_count;
self
}
#[inline]
pub fn preferred_key_frame_period(mut self, preferred_key_frame_period: u32) -> Self {
self.preferred_key_frame_period = preferred_key_frame_period;
self
}
#[inline]
pub fn preferred_consecutive_bipredictive_frame_count(
mut self,
preferred_consecutive_bipredictive_frame_count: u32,
) -> Self {
self.preferred_consecutive_bipredictive_frame_count =
preferred_consecutive_bipredictive_frame_count;
self
}
#[inline]
pub fn preferred_temporal_layer_count(
mut self,
preferred_temporal_layer_count: u32,
) -> Self {
self.preferred_temporal_layer_count = preferred_temporal_layer_count;
self
}
#[inline]
pub fn preferred_constant_q_index(
mut self,
preferred_constant_q_index: VideoEncodeAV1QIndexKHR,
) -> Self {
self.preferred_constant_q_index = preferred_constant_q_index;
self
}
#[inline]
pub fn preferred_max_single_reference_count(
mut self,
preferred_max_single_reference_count: u32,
) -> Self {
self.preferred_max_single_reference_count = preferred_max_single_reference_count;
self
}
#[inline]
pub fn preferred_single_reference_name_mask(
mut self,
preferred_single_reference_name_mask: u32,
) -> Self {
self.preferred_single_reference_name_mask = preferred_single_reference_name_mask;
self
}
#[inline]
pub fn preferred_max_unidirectional_compound_reference_count(
mut self,
preferred_max_unidirectional_compound_reference_count: u32,
) -> Self {
self.preferred_max_unidirectional_compound_reference_count =
preferred_max_unidirectional_compound_reference_count;
self
}
#[inline]
pub fn preferred_max_unidirectional_compound_group1_reference_count(
mut self,
preferred_max_unidirectional_compound_group1_reference_count: u32,
) -> Self {
self.preferred_max_unidirectional_compound_group1_reference_count =
preferred_max_unidirectional_compound_group1_reference_count;
self
}
#[inline]
pub fn preferred_unidirectional_compound_reference_name_mask(
mut self,
preferred_unidirectional_compound_reference_name_mask: u32,
) -> Self {
self.preferred_unidirectional_compound_reference_name_mask =
preferred_unidirectional_compound_reference_name_mask;
self
}
#[inline]
pub fn preferred_max_bidirectional_compound_reference_count(
mut self,
preferred_max_bidirectional_compound_reference_count: u32,
) -> Self {
self.preferred_max_bidirectional_compound_reference_count =
preferred_max_bidirectional_compound_reference_count;
self
}
#[inline]
pub fn preferred_max_bidirectional_compound_group1_reference_count(
mut self,
preferred_max_bidirectional_compound_group1_reference_count: u32,
) -> Self {
self.preferred_max_bidirectional_compound_group1_reference_count =
preferred_max_bidirectional_compound_group1_reference_count;
self
}
#[inline]
pub fn preferred_max_bidirectional_compound_group2_reference_count(
mut self,
preferred_max_bidirectional_compound_group2_reference_count: u32,
) -> Self {
self.preferred_max_bidirectional_compound_group2_reference_count =
preferred_max_bidirectional_compound_group2_reference_count;
self
}
#[inline]
pub fn preferred_bidirectional_compound_reference_name_mask(
mut self,
preferred_bidirectional_compound_reference_name_mask: u32,
) -> Self {
self.preferred_bidirectional_compound_reference_name_mask =
preferred_bidirectional_compound_reference_name_mask;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct PhysicalDeviceVideoEncodeAV1FeaturesKHR<'a> {
pub s_type: StructureType,
pub p_next: *mut c_void,
pub video_encode_av1: Bool32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for PhysicalDeviceVideoEncodeAV1FeaturesKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("PhysicalDeviceVideoEncodeAV1FeaturesKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("video_encode_av1", &self.video_encode_av1)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for PhysicalDeviceVideoEncodeAV1FeaturesKHR<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR;
}
unsafe impl Extends<PhysicalDeviceFeatures2<'_>> for PhysicalDeviceVideoEncodeAV1FeaturesKHR<'_> {}
unsafe impl Extends<DeviceCreateInfo<'_>> for PhysicalDeviceVideoEncodeAV1FeaturesKHR<'_> {}
impl Default for PhysicalDeviceVideoEncodeAV1FeaturesKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null_mut(),
video_encode_av1: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> PhysicalDeviceVideoEncodeAV1FeaturesKHR<'a> {
#[inline]
pub fn video_encode_av1(mut self, video_encode_av1: bool) -> Self {
self.video_encode_av1 = video_encode_av1.into();
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1SessionCreateInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub use_max_level: Bool32,
pub max_level: StdVideoAV1Level,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1SessionCreateInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1SessionCreateInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("use_max_level", &self.use_max_level)
.field("max_level", &self.max_level)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1SessionCreateInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR;
}
unsafe impl Extends<VideoSessionCreateInfoKHR<'_>> for VideoEncodeAV1SessionCreateInfoKHR<'_> {}
impl Default for VideoEncodeAV1SessionCreateInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
use_max_level: Default::default(),
max_level: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1SessionCreateInfoKHR<'a> {
#[inline]
pub fn use_max_level(mut self, use_max_level: bool) -> Self {
self.use_max_level = use_max_level.into();
self
}
#[inline]
pub fn max_level(mut self, max_level: StdVideoAV1Level) -> Self {
self.max_level = max_level;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1SessionParametersCreateInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub p_std_sequence_header: *const StdVideoAV1SequenceHeader<'a>,
pub p_std_decoder_model_info: *const StdVideoEncodeAV1DecoderModelInfo,
pub std_operating_point_count: u32,
pub p_std_operating_points: *const StdVideoEncodeAV1OperatingPointInfo,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1SessionParametersCreateInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1SessionParametersCreateInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("p_std_sequence_header", &self.p_std_sequence_header)
.field("p_std_decoder_model_info", &self.p_std_decoder_model_info)
.field("std_operating_point_count", &self.std_operating_point_count)
.field("p_std_operating_points", &self.p_std_operating_points)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1SessionParametersCreateInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR;
}
unsafe impl Extends<VideoSessionParametersCreateInfoKHR<'_>>
for VideoEncodeAV1SessionParametersCreateInfoKHR<'_>
{
}
impl Default for VideoEncodeAV1SessionParametersCreateInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
p_std_sequence_header: ptr::null(),
p_std_decoder_model_info: ptr::null(),
std_operating_point_count: Default::default(),
p_std_operating_points: ptr::null(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1SessionParametersCreateInfoKHR<'a> {
#[inline]
pub fn std_sequence_header(
mut self,
std_sequence_header: &'a StdVideoAV1SequenceHeader<'a>,
) -> Self {
self.p_std_sequence_header = std_sequence_header;
self
}
#[inline]
pub fn std_decoder_model_info(
mut self,
std_decoder_model_info: &'a StdVideoEncodeAV1DecoderModelInfo,
) -> Self {
self.p_std_decoder_model_info = std_decoder_model_info;
self
}
#[inline]
pub fn std_operating_points(
mut self,
std_operating_points: &'a [StdVideoEncodeAV1OperatingPointInfo],
) -> Self {
self.std_operating_point_count = std_operating_points.len().try_into().unwrap();
self.p_std_operating_points = std_operating_points.as_ptr() as _;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1DpbSlotInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub p_std_reference_info: *const StdVideoEncodeAV1ReferenceInfo<'a>,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1DpbSlotInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1DpbSlotInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("p_std_reference_info", &self.p_std_reference_info)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1DpbSlotInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR;
}
unsafe impl Extends<VideoReferenceSlotInfoKHR<'_>> for VideoEncodeAV1DpbSlotInfoKHR<'_> {}
impl Default for VideoEncodeAV1DpbSlotInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
p_std_reference_info: ptr::null(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1DpbSlotInfoKHR<'a> {
#[inline]
pub fn std_reference_info(
mut self,
std_reference_info: &'a StdVideoEncodeAV1ReferenceInfo<'a>,
) -> Self {
self.p_std_reference_info = std_reference_info;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1PictureInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub prediction_mode: VideoEncodeAV1PredictionModeKHR,
pub rate_control_group: VideoEncodeAV1RateControlGroupKHR,
pub constant_q_index: u32,
pub p_std_picture_info: *const StdVideoEncodeAV1PictureInfo<'a>,
pub reference_name_slot_indices: [i32; MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR as usize],
pub primary_reference_cdf_only: Bool32,
pub generate_obu_extension_header: Bool32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1PictureInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1PictureInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("prediction_mode", &self.prediction_mode)
.field("rate_control_group", &self.rate_control_group)
.field("constant_q_index", &self.constant_q_index)
.field("p_std_picture_info", &self.p_std_picture_info)
.field(
"reference_name_slot_indices",
&self.reference_name_slot_indices,
)
.field(
"primary_reference_cdf_only",
&self.primary_reference_cdf_only,
)
.field(
"generate_obu_extension_header",
&self.generate_obu_extension_header,
)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1PictureInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_AV1_PICTURE_INFO_KHR;
}
unsafe impl Extends<VideoEncodeInfoKHR<'_>> for VideoEncodeAV1PictureInfoKHR<'_> {}
impl Default for VideoEncodeAV1PictureInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
prediction_mode: Default::default(),
rate_control_group: Default::default(),
constant_q_index: Default::default(),
p_std_picture_info: ptr::null(),
reference_name_slot_indices: [Default::default(); _],
primary_reference_cdf_only: Default::default(),
generate_obu_extension_header: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1PictureInfoKHR<'a> {
#[inline]
pub fn prediction_mode(mut self, prediction_mode: VideoEncodeAV1PredictionModeKHR) -> Self {
self.prediction_mode = prediction_mode;
self
}
#[inline]
pub fn rate_control_group(
mut self,
rate_control_group: VideoEncodeAV1RateControlGroupKHR,
) -> Self {
self.rate_control_group = rate_control_group;
self
}
#[inline]
pub fn constant_q_index(mut self, constant_q_index: u32) -> Self {
self.constant_q_index = constant_q_index;
self
}
#[inline]
pub fn std_picture_info(
mut self,
std_picture_info: &'a StdVideoEncodeAV1PictureInfo<'a>,
) -> Self {
self.p_std_picture_info = std_picture_info;
self
}
#[inline]
pub fn reference_name_slot_indices(
mut self,
reference_name_slot_indices: [i32; MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR as usize],
) -> Self {
self.reference_name_slot_indices = reference_name_slot_indices;
self
}
#[inline]
pub fn primary_reference_cdf_only(mut self, primary_reference_cdf_only: bool) -> Self {
self.primary_reference_cdf_only = primary_reference_cdf_only.into();
self
}
#[inline]
pub fn generate_obu_extension_header(
mut self,
generate_obu_extension_header: bool,
) -> Self {
self.generate_obu_extension_header = generate_obu_extension_header.into();
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1ProfileInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub std_profile: StdVideoAV1Profile,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1ProfileInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1ProfileInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("std_profile", &self.std_profile)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1ProfileInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_AV1_PROFILE_INFO_KHR;
}
unsafe impl Extends<VideoProfileInfoKHR<'_>> for VideoEncodeAV1ProfileInfoKHR<'_> {}
unsafe impl Extends<QueryPoolCreateInfo<'_>> for VideoEncodeAV1ProfileInfoKHR<'_> {}
impl Default for VideoEncodeAV1ProfileInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
std_profile: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1ProfileInfoKHR<'a> {
#[inline]
pub fn std_profile(mut self, std_profile: StdVideoAV1Profile) -> Self {
self.std_profile = std_profile;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1RateControlInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub flags: VideoEncodeAV1RateControlFlagsKHR,
pub gop_frame_count: u32,
pub key_frame_period: u32,
pub consecutive_bipredictive_frame_count: u32,
pub temporal_layer_count: u32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1RateControlInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1RateControlInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("flags", &self.flags)
.field("gop_frame_count", &self.gop_frame_count)
.field("key_frame_period", &self.key_frame_period)
.field(
"consecutive_bipredictive_frame_count",
&self.consecutive_bipredictive_frame_count,
)
.field("temporal_layer_count", &self.temporal_layer_count)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1RateControlInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType = StructureType::VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR;
}
unsafe impl Extends<VideoCodingControlInfoKHR<'_>> for VideoEncodeAV1RateControlInfoKHR<'_> {}
unsafe impl Extends<VideoBeginCodingInfoKHR<'_>> for VideoEncodeAV1RateControlInfoKHR<'_> {}
impl Default for VideoEncodeAV1RateControlInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
flags: Default::default(),
gop_frame_count: Default::default(),
key_frame_period: Default::default(),
consecutive_bipredictive_frame_count: Default::default(),
temporal_layer_count: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1RateControlInfoKHR<'a> {
#[inline]
pub fn flags(mut self, flags: VideoEncodeAV1RateControlFlagsKHR) -> Self {
self.flags = flags;
self
}
#[inline]
pub fn gop_frame_count(mut self, gop_frame_count: u32) -> Self {
self.gop_frame_count = gop_frame_count;
self
}
#[inline]
pub fn key_frame_period(mut self, key_frame_period: u32) -> Self {
self.key_frame_period = key_frame_period;
self
}
#[inline]
pub fn consecutive_bipredictive_frame_count(
mut self,
consecutive_bipredictive_frame_count: u32,
) -> Self {
self.consecutive_bipredictive_frame_count = consecutive_bipredictive_frame_count;
self
}
#[inline]
pub fn temporal_layer_count(mut self, temporal_layer_count: u32) -> Self {
self.temporal_layer_count = temporal_layer_count;
self
}
}
#[repr(C)]
#[cfg_attr(feature = "debug", derive(Debug))]
#[derive(Copy, Clone, Default)]
#[must_use]
pub struct VideoEncodeAV1QIndexKHR {
pub intra_q_index: u32,
pub predictive_q_index: u32,
pub bipredictive_q_index: u32,
}
impl VideoEncodeAV1QIndexKHR {
#[inline]
pub fn intra_q_index(mut self, intra_q_index: u32) -> Self {
self.intra_q_index = intra_q_index;
self
}
#[inline]
pub fn predictive_q_index(mut self, predictive_q_index: u32) -> Self {
self.predictive_q_index = predictive_q_index;
self
}
#[inline]
pub fn bipredictive_q_index(mut self, bipredictive_q_index: u32) -> Self {
self.bipredictive_q_index = bipredictive_q_index;
self
}
}
#[repr(C)]
#[cfg_attr(feature = "debug", derive(Debug))]
#[derive(Copy, Clone, Default)]
#[must_use]
pub struct VideoEncodeAV1FrameSizeKHR {
pub intra_frame_size: u32,
pub predictive_frame_size: u32,
pub bipredictive_frame_size: u32,
}
impl VideoEncodeAV1FrameSizeKHR {
#[inline]
pub fn intra_frame_size(mut self, intra_frame_size: u32) -> Self {
self.intra_frame_size = intra_frame_size;
self
}
#[inline]
pub fn predictive_frame_size(mut self, predictive_frame_size: u32) -> Self {
self.predictive_frame_size = predictive_frame_size;
self
}
#[inline]
pub fn bipredictive_frame_size(mut self, bipredictive_frame_size: u32) -> Self {
self.bipredictive_frame_size = bipredictive_frame_size;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1GopRemainingFrameInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub use_gop_remaining_frames: Bool32,
pub gop_remaining_intra: u32,
pub gop_remaining_predictive: u32,
pub gop_remaining_bipredictive: u32,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1GopRemainingFrameInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1GopRemainingFrameInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("use_gop_remaining_frames", &self.use_gop_remaining_frames)
.field("gop_remaining_intra", &self.gop_remaining_intra)
.field("gop_remaining_predictive", &self.gop_remaining_predictive)
.field(
"gop_remaining_bipredictive",
&self.gop_remaining_bipredictive,
)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1GopRemainingFrameInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR;
}
unsafe impl Extends<VideoBeginCodingInfoKHR<'_>> for VideoEncodeAV1GopRemainingFrameInfoKHR<'_> {}
impl Default for VideoEncodeAV1GopRemainingFrameInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
use_gop_remaining_frames: Default::default(),
gop_remaining_intra: Default::default(),
gop_remaining_predictive: Default::default(),
gop_remaining_bipredictive: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1GopRemainingFrameInfoKHR<'a> {
#[inline]
pub fn use_gop_remaining_frames(mut self, use_gop_remaining_frames: bool) -> Self {
self.use_gop_remaining_frames = use_gop_remaining_frames.into();
self
}
#[inline]
pub fn gop_remaining_intra(mut self, gop_remaining_intra: u32) -> Self {
self.gop_remaining_intra = gop_remaining_intra;
self
}
#[inline]
pub fn gop_remaining_predictive(mut self, gop_remaining_predictive: u32) -> Self {
self.gop_remaining_predictive = gop_remaining_predictive;
self
}
#[inline]
pub fn gop_remaining_bipredictive(mut self, gop_remaining_bipredictive: u32) -> Self {
self.gop_remaining_bipredictive = gop_remaining_bipredictive;
self
}
}
#[repr(C)]
#[derive(Copy, Clone)]
#[must_use]
pub struct VideoEncodeAV1RateControlLayerInfoKHR<'a> {
pub s_type: StructureType,
pub p_next: *const c_void,
pub use_min_q_index: Bool32,
pub min_q_index: VideoEncodeAV1QIndexKHR,
pub use_max_q_index: Bool32,
pub max_q_index: VideoEncodeAV1QIndexKHR,
pub use_max_frame_size: Bool32,
pub max_frame_size: VideoEncodeAV1FrameSizeKHR,
pub _marker: PhantomData<&'a ()>,
}
#[cfg(feature = "debug")]
impl fmt::Debug for VideoEncodeAV1RateControlLayerInfoKHR<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("VideoEncodeAV1RateControlLayerInfoKHR")
.field("s_type", &self.s_type)
.field("p_next", &self.p_next)
.field("use_min_q_index", &self.use_min_q_index)
.field("min_q_index", &self.min_q_index)
.field("use_max_q_index", &self.use_max_q_index)
.field("max_q_index", &self.max_q_index)
.field("use_max_frame_size", &self.use_max_frame_size)
.field("max_frame_size", &self.max_frame_size)
.finish()
}
}
unsafe impl<'a> TaggedStructure<'a> for VideoEncodeAV1RateControlLayerInfoKHR<'a> {
const STRUCTURE_TYPE: StructureType =
StructureType::VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR;
}
unsafe impl Extends<VideoEncodeRateControlLayerInfoKHR<'_>>
for VideoEncodeAV1RateControlLayerInfoKHR<'_>
{
}
impl Default for VideoEncodeAV1RateControlLayerInfoKHR<'_> {
fn default() -> Self {
Self {
s_type: Self::STRUCTURE_TYPE,
p_next: ptr::null(),
use_min_q_index: Default::default(),
min_q_index: Default::default(),
use_max_q_index: Default::default(),
max_q_index: Default::default(),
use_max_frame_size: Default::default(),
max_frame_size: Default::default(),
_marker: PhantomData,
}
}
}
impl<'a> VideoEncodeAV1RateControlLayerInfoKHR<'a> {
#[inline]
pub fn use_min_q_index(mut self, use_min_q_index: bool) -> Self {
self.use_min_q_index = use_min_q_index.into();
self
}
#[inline]
pub fn min_q_index(mut self, min_q_index: VideoEncodeAV1QIndexKHR) -> Self {
self.min_q_index = min_q_index;
self
}
#[inline]
pub fn use_max_q_index(mut self, use_max_q_index: bool) -> Self {
self.use_max_q_index = use_max_q_index.into();
self
}
#[inline]
pub fn max_q_index(mut self, max_q_index: VideoEncodeAV1QIndexKHR) -> Self {
self.max_q_index = max_q_index;
self
}
#[inline]
pub fn use_max_frame_size(mut self, use_max_frame_size: bool) -> Self {
self.use_max_frame_size = use_max_frame_size.into();
self
}
#[inline]
pub fn max_frame_size(mut self, max_frame_size: VideoEncodeAV1FrameSizeKHR) -> Self {
self.max_frame_size = max_frame_size;
self
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct VideoEncodeAV1PredictionModeKHR(i32);
impl VideoEncodeAV1PredictionModeKHR {
#[inline]
pub const fn from_raw(x: i32) -> Self {
Self(x)
}
#[inline]
pub const fn as_raw(self) -> i32 {
self.0
}
pub const INTRA_ONLY_KHR: Self = Self(0);
pub const SINGLE_REFERENCE_KHR: Self = Self(1);
pub const UNIDIRECTIONAL_COMPOUND_KHR: Self = Self(2);
pub const BIDIRECTIONAL_COMPOUND_KHR: Self = Self(3);
}
impl fmt::Debug for VideoEncodeAV1PredictionModeKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Self::INTRA_ONLY_KHR => Some("INTRA_ONLY_KHR"),
Self::SINGLE_REFERENCE_KHR => Some("SINGLE_REFERENCE_KHR"),
Self::UNIDIRECTIONAL_COMPOUND_KHR => Some("UNIDIRECTIONAL_COMPOUND_KHR"),
Self::BIDIRECTIONAL_COMPOUND_KHR => Some("BIDIRECTIONAL_COMPOUND_KHR"),
_ => None,
};
if let Some(name) = name {
f.write_str(name)
} else {
self.0.fmt(f)
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct VideoEncodeAV1RateControlGroupKHR(i32);
impl VideoEncodeAV1RateControlGroupKHR {
#[inline]
pub const fn from_raw(x: i32) -> Self {
Self(x)
}
#[inline]
pub const fn as_raw(self) -> i32 {
self.0
}
pub const INTRA_KHR: Self = Self(0);
pub const PREDICTIVE_KHR: Self = Self(1);
pub const BIPREDICTIVE_KHR: Self = Self(2);
}
impl fmt::Debug for VideoEncodeAV1RateControlGroupKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Self::INTRA_KHR => Some("INTRA_KHR"),
Self::PREDICTIVE_KHR => Some("PREDICTIVE_KHR"),
Self::BIPREDICTIVE_KHR => Some("BIPREDICTIVE_KHR"),
_ => None,
};
if let Some(name) = name {
f.write_str(name)
} else {
self.0.fmt(f)
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1CapabilityFlagsKHR(Flags);
vk_bitflags_wrapped!(
VideoEncodeAV1CapabilityFlagsKHR,
Flags,
VideoEncodeAV1CapabilityFlagBitsKHR
);
impl fmt::Debug for VideoEncodeAV1CapabilityFlagsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[
(
VideoEncodeAV1CapabilityFlagBitsKHR::PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_KHR
.0,
"PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_KHR",
),
(
VideoEncodeAV1CapabilityFlagBitsKHR::GENERATE_OBU_EXTENSION_HEADER_KHR.0,
"GENERATE_OBU_EXTENSION_HEADER_KHR",
),
(
VideoEncodeAV1CapabilityFlagBitsKHR::PRIMARY_REFERENCE_CDF_ONLY_KHR.0,
"PRIMARY_REFERENCE_CDF_ONLY_KHR",
),
(
VideoEncodeAV1CapabilityFlagBitsKHR::FRAME_SIZE_OVERRIDE_KHR.0,
"FRAME_SIZE_OVERRIDE_KHR",
),
(
VideoEncodeAV1CapabilityFlagBitsKHR::MOTION_VECTOR_SCALING_KHR.0,
"MOTION_VECTOR_SCALING_KHR",
),
(
VideoEncodeAV1CapabilityFlagBitsKHR::COMPOUND_PREDICTION_INTRA_REFRESH_KHR.0,
"COMPOUND_PREDICTION_INTRA_REFRESH_KHR",
),
];
debug_flags(f, KNOWN, self.0)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1CapabilityFlagBitsKHR(u32);
impl VideoEncodeAV1CapabilityFlagBitsKHR {
pub const PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_KHR: Self = Self(1 << 0);
pub const GENERATE_OBU_EXTENSION_HEADER_KHR: Self = Self(1 << 1);
pub const PRIMARY_REFERENCE_CDF_ONLY_KHR: Self = Self(1 << 2);
pub const FRAME_SIZE_OVERRIDE_KHR: Self = Self(1 << 3);
pub const MOTION_VECTOR_SCALING_KHR: Self = Self(1 << 4);
pub const COMPOUND_PREDICTION_INTRA_REFRESH_KHR: Self = Self(1 << 5);
}
impl fmt::Debug for VideoEncodeAV1CapabilityFlagBitsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Self::PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_KHR => {
Some("PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_KHR")
}
Self::GENERATE_OBU_EXTENSION_HEADER_KHR => {
Some("GENERATE_OBU_EXTENSION_HEADER_KHR")
}
Self::PRIMARY_REFERENCE_CDF_ONLY_KHR => Some("PRIMARY_REFERENCE_CDF_ONLY_KHR"),
Self::FRAME_SIZE_OVERRIDE_KHR => Some("FRAME_SIZE_OVERRIDE_KHR"),
Self::MOTION_VECTOR_SCALING_KHR => Some("MOTION_VECTOR_SCALING_KHR"),
Self::COMPOUND_PREDICTION_INTRA_REFRESH_KHR => {
Some("COMPOUND_PREDICTION_INTRA_REFRESH_KHR")
}
_ => None,
};
if let Some(name) = name {
f.write_str(name)
} else {
self.0.fmt(f)
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1StdFlagsKHR(Flags);
vk_bitflags_wrapped!(
VideoEncodeAV1StdFlagsKHR,
Flags,
VideoEncodeAV1StdFlagBitsKHR
);
impl fmt::Debug for VideoEncodeAV1StdFlagsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[
(
VideoEncodeAV1StdFlagBitsKHR::UNIFORM_TILE_SPACING_FLAG_SET_KHR.0,
"UNIFORM_TILE_SPACING_FLAG_SET_KHR",
),
(
VideoEncodeAV1StdFlagBitsKHR::SKIP_MODE_PRESENT_UNSET_KHR.0,
"SKIP_MODE_PRESENT_UNSET_KHR",
),
(
VideoEncodeAV1StdFlagBitsKHR::PRIMARY_REF_FRAME_KHR.0,
"PRIMARY_REF_FRAME_KHR",
),
(VideoEncodeAV1StdFlagBitsKHR::DELTA_Q_KHR.0, "DELTA_Q_KHR"),
];
debug_flags(f, KNOWN, self.0)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1StdFlagBitsKHR(u32);
impl VideoEncodeAV1StdFlagBitsKHR {
pub const UNIFORM_TILE_SPACING_FLAG_SET_KHR: Self = Self(1 << 0);
pub const SKIP_MODE_PRESENT_UNSET_KHR: Self = Self(1 << 1);
pub const PRIMARY_REF_FRAME_KHR: Self = Self(1 << 2);
pub const DELTA_Q_KHR: Self = Self(1 << 3);
}
impl fmt::Debug for VideoEncodeAV1StdFlagBitsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Self::UNIFORM_TILE_SPACING_FLAG_SET_KHR => {
Some("UNIFORM_TILE_SPACING_FLAG_SET_KHR")
}
Self::SKIP_MODE_PRESENT_UNSET_KHR => Some("SKIP_MODE_PRESENT_UNSET_KHR"),
Self::PRIMARY_REF_FRAME_KHR => Some("PRIMARY_REF_FRAME_KHR"),
Self::DELTA_Q_KHR => Some("DELTA_Q_KHR"),
_ => None,
};
if let Some(name) = name {
f.write_str(name)
} else {
self.0.fmt(f)
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1RateControlFlagsKHR(Flags);
vk_bitflags_wrapped!(
VideoEncodeAV1RateControlFlagsKHR,
Flags,
VideoEncodeAV1RateControlFlagBitsKHR
);
impl fmt::Debug for VideoEncodeAV1RateControlFlagsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[
(
VideoEncodeAV1RateControlFlagBitsKHR::REGULAR_GOP_KHR.0,
"REGULAR_GOP_KHR",
),
(
VideoEncodeAV1RateControlFlagBitsKHR::TEMPORAL_LAYER_PATTERN_DYADIC_KHR.0,
"TEMPORAL_LAYER_PATTERN_DYADIC_KHR",
),
(
VideoEncodeAV1RateControlFlagBitsKHR::REFERENCE_PATTERN_FLAT_KHR.0,
"REFERENCE_PATTERN_FLAT_KHR",
),
(
VideoEncodeAV1RateControlFlagBitsKHR::REFERENCE_PATTERN_DYADIC_KHR.0,
"REFERENCE_PATTERN_DYADIC_KHR",
),
];
debug_flags(f, KNOWN, self.0)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1RateControlFlagBitsKHR(u32);
impl VideoEncodeAV1RateControlFlagBitsKHR {
pub const REGULAR_GOP_KHR: Self = Self(1 << 0);
pub const TEMPORAL_LAYER_PATTERN_DYADIC_KHR: Self = Self(1 << 1);
pub const REFERENCE_PATTERN_FLAT_KHR: Self = Self(1 << 2);
pub const REFERENCE_PATTERN_DYADIC_KHR: Self = Self(1 << 3);
}
impl fmt::Debug for VideoEncodeAV1RateControlFlagBitsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Self::REGULAR_GOP_KHR => Some("REGULAR_GOP_KHR"),
Self::TEMPORAL_LAYER_PATTERN_DYADIC_KHR => {
Some("TEMPORAL_LAYER_PATTERN_DYADIC_KHR")
}
Self::REFERENCE_PATTERN_FLAT_KHR => Some("REFERENCE_PATTERN_FLAT_KHR"),
Self::REFERENCE_PATTERN_DYADIC_KHR => Some("REFERENCE_PATTERN_DYADIC_KHR"),
_ => None,
};
if let Some(name) = name {
f.write_str(name)
} else {
self.0.fmt(f)
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1SuperblockSizeFlagsKHR(Flags);
vk_bitflags_wrapped!(
VideoEncodeAV1SuperblockSizeFlagsKHR,
Flags,
VideoEncodeAV1SuperblockSizeFlagBitsKHR
);
impl fmt::Debug for VideoEncodeAV1SuperblockSizeFlagsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
const KNOWN: &[(Flags, &str)] = &[
(
VideoEncodeAV1SuperblockSizeFlagBitsKHR::_64_KHR.0,
"_64_KHR",
),
(
VideoEncodeAV1SuperblockSizeFlagBitsKHR::_128_KHR.0,
"_128_KHR",
),
];
debug_flags(f, KNOWN, self.0)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Default, PartialEq, Eq, Hash)]
pub struct VideoEncodeAV1SuperblockSizeFlagBitsKHR(u32);
impl VideoEncodeAV1SuperblockSizeFlagBitsKHR {
pub const _64_KHR: Self = Self(1 << 0);
pub const _128_KHR: Self = Self(1 << 1);
}
impl fmt::Debug for VideoEncodeAV1SuperblockSizeFlagBitsKHR {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let name = match *self {
Self::_64_KHR => Some("_64_KHR"),
Self::_128_KHR => Some("_128_KHR"),
_ => None,
};
if let Some(name) = name {
f.write_str(name)
} else {
self.0.fmt(f)
}
}
}
}
#[cfg(feature = "ffi")]
pub(super) mod ffi {
#![allow(non_camel_case_types)]
use super::defs::*;
pub type VkVideoEncodeAV1CapabilitiesKHR = VideoEncodeAV1CapabilitiesKHR<'static>;
pub type VkVideoEncodeAV1QualityLevelPropertiesKHR =
VideoEncodeAV1QualityLevelPropertiesKHR<'static>;
pub type VkPhysicalDeviceVideoEncodeAV1FeaturesKHR =
PhysicalDeviceVideoEncodeAV1FeaturesKHR<'static>;
pub type VkVideoEncodeAV1SessionCreateInfoKHR = VideoEncodeAV1SessionCreateInfoKHR<'static>;
pub type VkVideoEncodeAV1SessionParametersCreateInfoKHR =
VideoEncodeAV1SessionParametersCreateInfoKHR<'static>;
pub type VkVideoEncodeAV1DpbSlotInfoKHR = VideoEncodeAV1DpbSlotInfoKHR<'static>;
pub type VkVideoEncodeAV1PictureInfoKHR = VideoEncodeAV1PictureInfoKHR<'static>;
pub type VkVideoEncodeAV1ProfileInfoKHR = VideoEncodeAV1ProfileInfoKHR<'static>;
pub type VkVideoEncodeAV1RateControlInfoKHR = VideoEncodeAV1RateControlInfoKHR<'static>;
pub type VkVideoEncodeAV1QIndexKHR = VideoEncodeAV1QIndexKHR;
pub type VkVideoEncodeAV1FrameSizeKHR = VideoEncodeAV1FrameSizeKHR;
pub type VkVideoEncodeAV1GopRemainingFrameInfoKHR =
VideoEncodeAV1GopRemainingFrameInfoKHR<'static>;
pub type VkVideoEncodeAV1RateControlLayerInfoKHR =
VideoEncodeAV1RateControlLayerInfoKHR<'static>;
pub type VkVideoEncodeAV1PredictionModeKHR = VideoEncodeAV1PredictionModeKHR;
pub type VkVideoEncodeAV1RateControlGroupKHR = VideoEncodeAV1RateControlGroupKHR;
pub type VkVideoEncodeAV1CapabilityFlagsKHR = VideoEncodeAV1CapabilityFlagsKHR;
pub type VkVideoEncodeAV1CapabilityFlagBitsKHR = VideoEncodeAV1CapabilityFlagBitsKHR;
pub type VkVideoEncodeAV1StdFlagsKHR = VideoEncodeAV1StdFlagsKHR;
pub type VkVideoEncodeAV1StdFlagBitsKHR = VideoEncodeAV1StdFlagBitsKHR;
pub type VkVideoEncodeAV1RateControlFlagsKHR = VideoEncodeAV1RateControlFlagsKHR;
pub type VkVideoEncodeAV1RateControlFlagBitsKHR = VideoEncodeAV1RateControlFlagBitsKHR;
pub type VkVideoEncodeAV1SuperblockSizeFlagsKHR = VideoEncodeAV1SuperblockSizeFlagsKHR;
pub type VkVideoEncodeAV1SuperblockSizeFlagBitsKHR = VideoEncodeAV1SuperblockSizeFlagBitsKHR;
impl VideoEncodeAV1CapabilitiesKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1CapabilitiesKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1QualityLevelPropertiesKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1QualityLevelPropertiesKHR {
unsafe { core::mem::transmute(self) }
}
}
impl PhysicalDeviceVideoEncodeAV1FeaturesKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkPhysicalDeviceVideoEncodeAV1FeaturesKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1SessionCreateInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1SessionCreateInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1SessionParametersCreateInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(
&self,
) -> &VkVideoEncodeAV1SessionParametersCreateInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1DpbSlotInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1DpbSlotInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1PictureInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1PictureInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1ProfileInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1ProfileInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1RateControlInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1RateControlInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1GopRemainingFrameInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1GopRemainingFrameInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
impl VideoEncodeAV1RateControlLayerInfoKHR<'_> {
#[inline]
pub unsafe fn drop_lifetime_for_ffi(&self) -> &VkVideoEncodeAV1RateControlLayerInfoKHR {
unsafe { core::mem::transmute(self) }
}
}
}