pub struct VideoEncodeExtent {
pub profile: &'static str,
pub minimum: (u32, u32),
pub maximum: (u32, u32),
pub granularity: (u32, u32),
pub max_p_picture_l0_references: u32,
pub max_b_picture_l0_references: u32,
pub max_l1_references: u32,
pub rate_control_modes: Vec<&'static str>,
}Expand description
Coded extents and coding limits one video-encode profile has on a device.
Fields§
§profile: &'static strThe H.264 profile these are the limits of: the one h264_vulkan
opens its session with on this device (constrained_baseline,
main, or high).
minimum: (u32, u32)Smallest accepted width and height, in samples.
maximum: (u32, u32)Largest accepted width and height, in samples.
granularity: (u32, u32)Granularity the coded extent is aligned up to before the limits apply:
VkVideoEncodeCapabilitiesKHR::encodeInputPictureGranularity, which
FFmpeg aligns its coded size to.
This is why a 158x62 output is accepted where 64x48 is not: both are
below the minimum as written, but the first aligns up to the minimum
and the second does not. Comparing an output size against minimum
without aligning it first gets that case wrong in the strict direction.
max_p_picture_l0_references: u32VkVideoEncodeH264CapabilitiesKHR::maxPPictureL0ReferenceCount: how
many references a P picture may use.
max_b_picture_l0_references: u32VkVideoEncodeH264CapabilitiesKHR::maxBPictureL0ReferenceCount: the
forward references a B picture may use. Zero, together with
max_l1_references, means the device encodes no B pictures.
max_l1_references: u32VkVideoEncodeH264CapabilitiesKHR::maxL1ReferenceCount: the backward
references a B picture may use.
rate_control_modes: Vec<&'static str>VkVideoEncodeCapabilitiesKHR::rateControlModes, as the mode names
the device reports: cbr, vbr, disabled (constant QP).
Implementations§
Source§impl VideoEncodeExtent
impl VideoEncodeExtent
Sourcepub const fn supports_b_pictures(&self) -> bool
pub const fn supports_b_pictures(&self) -> bool
Whether the device can encode B pictures at all.
Trait Implementations§
Source§impl Clone for VideoEncodeExtent
impl Clone for VideoEncodeExtent
Source§impl Debug for VideoEncodeExtent
impl Debug for VideoEncodeExtent
impl Eq for VideoEncodeExtent
Source§impl PartialEq for VideoEncodeExtent
impl PartialEq for VideoEncodeExtent
impl StructuralPartialEq for VideoEncodeExtent
Auto Trait Implementations§
impl Freeze for VideoEncodeExtent
impl RefUnwindSafe for VideoEncodeExtent
impl Send for VideoEncodeExtent
impl Sync for VideoEncodeExtent
impl Unpin for VideoEncodeExtent
impl UnsafeUnpin for VideoEncodeExtent
impl UnwindSafe for VideoEncodeExtent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.