Struct ffmpeg_sys_next::AVPixFmtDescriptor
source · #[repr(C)]pub struct AVPixFmtDescriptor {
pub name: *const c_char,
pub nb_components: u8,
pub log2_chroma_w: u8,
pub log2_chroma_h: u8,
pub flags: u64,
pub comp: [AVComponentDescriptor; 4],
pub alias: *const c_char,
}Expand description
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes of an image. It also stores the subsampling factors and number of components.
@note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV and all the YUV variants) AVPixFmtDescriptor just stores how values are stored not what these values represent.
Fields§
§name: *const c_char§nb_components: u8< The number of components each pixel has, (1-4)
log2_chroma_w: u8Amount to shift the luma width right to find the chroma width. For YV12 this is 1 for example. chroma_width = AV_CEIL_RSHIFT(luma_width, log2_chroma_w) The note above is needed to ensure rounding up. This value only refers to the chroma components.
log2_chroma_h: u8Amount to shift the luma height right to find the chroma height. For YV12 this is 1 for example. chroma_height= AV_CEIL_RSHIFT(luma_height, log2_chroma_h) The note above is needed to ensure rounding up. This value only refers to the chroma components.
flags: u64Combination of AV_PIX_FMT_FLAG_… flags.
comp: [AVComponentDescriptor; 4]Parameters that describe how pixels are packed. If the format has 1 or 2 components, then luma is 0. If the format has 3 or 4 components: if the RGB flag is set then 0 is red, 1 is green and 2 is blue; otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V.
If present, the Alpha channel is always the last component.
alias: *const c_charAlternative comma-separated names.
Trait Implementations§
source§impl Clone for AVPixFmtDescriptor
impl Clone for AVPixFmtDescriptor
source§fn clone(&self) -> AVPixFmtDescriptor
fn clone(&self) -> AVPixFmtDescriptor
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AVPixFmtDescriptor
impl Debug for AVPixFmtDescriptor
source§impl PartialEq for AVPixFmtDescriptor
impl PartialEq for AVPixFmtDescriptor
source§fn eq(&self, other: &AVPixFmtDescriptor) -> bool
fn eq(&self, other: &AVPixFmtDescriptor) -> bool
self and other values to be equal, and is used
by ==.impl Copy for AVPixFmtDescriptor
impl Eq for AVPixFmtDescriptor
impl StructuralPartialEq for AVPixFmtDescriptor
Auto Trait Implementations§
impl Freeze for AVPixFmtDescriptor
impl RefUnwindSafe for AVPixFmtDescriptor
impl !Send for AVPixFmtDescriptor
impl !Sync for AVPixFmtDescriptor
impl Unpin for AVPixFmtDescriptor
impl UnwindSafe for AVPixFmtDescriptor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)