pub struct ImageFormat2 {
pub pixel_format: PixelFormat,
pub coded_width: u32,
pub coded_height: u32,
pub bytes_per_row: u32,
pub display_width: u32,
pub display_height: u32,
pub layers: u32,
pub color_space: ColorSpace,
pub has_pixel_aspect_ratio: bool,
pub pixel_aspect_ratio_width: u32,
pub pixel_aspect_ratio_height: u32,
}
Expand description
Describes how an image is represented.
This type is deprecated for new code, but is still used by some camera code.
Fields§
§pixel_format: PixelFormat
Pixel format.
coded_width: u32
Row width in pixels that exist in the buffer. Must be >= display_width. Can be < the width implied by stride_bytes.
coded_height: u32
Number of rows. Must be >= display_height.
bytes_per_row: u32
Stride in bytes of plane 0. Planes beyond plane 0 (if any, depending on pixel_format) have a known fixed relationship with plane 0’s stride. For Intel tiled textures, the stride is for the linearized version of the texture.
display_width: u32
Row width in pixels that are to be displayed. This can be <= coded_width. Any cropping occurs on the right of the image (not left).
display_height: u32
Number of rows to be displayed. This can be <= coded_height, with any cropping on the bottom (not top).
layers: u32
Number of layers within a multi-layered image.
color_space: ColorSpace
Color space.
has_pixel_aspect_ratio: bool
The pixel_aspect_ratio_width : pixel_aspect_ratio_height is the pixel aspect ratio (AKA sample aspect ratio aka SAR) for the luma (AKA Y) samples. A pixel_aspect_ratio of 1:1 mean square pixels. A pixel_aspect_ratio of 2:1 would mean pixels that are displayed twice as wide as they are tall. Codec implementation should ensure these two values are relatively prime by reducing the fraction (dividing both by GCF) if necessary.
When has_pixel_aspect_ratio == false, the pixel_aspect_ratio is unknown. A default of 1:1 can be appropriate in some cases, but as always, a consumer may determine the actual pixel_aspect_ratio by OOB means.
pixel_aspect_ratio_width: u32
§pixel_aspect_ratio_height: u32
Trait Implementations§
Source§impl Clone for ImageFormat2
impl Clone for ImageFormat2
Source§fn clone(&self) -> ImageFormat2
fn clone(&self) -> ImageFormat2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ImageFormat2
impl Debug for ImageFormat2
Source§impl<D: ResourceDialect> Decode<ImageFormat2, D> for ImageFormat2
impl<D: ResourceDialect> Decode<ImageFormat2, D> for ImageFormat2
Source§impl<D: ResourceDialect> Encode<ImageFormat2, D> for &ImageFormat2
impl<D: ResourceDialect> Encode<ImageFormat2, D> for &ImageFormat2
Source§impl<D: ResourceDialect, T0: Encode<PixelFormat, D>, T1: Encode<u32, D>, T2: Encode<u32, D>, T3: Encode<u32, D>, T4: Encode<u32, D>, T5: Encode<u32, D>, T6: Encode<u32, D>, T7: Encode<ColorSpace, D>, T8: Encode<bool, D>, T9: Encode<u32, D>, T10: Encode<u32, D>> Encode<ImageFormat2, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<D: ResourceDialect, T0: Encode<PixelFormat, D>, T1: Encode<u32, D>, T2: Encode<u32, D>, T3: Encode<u32, D>, T4: Encode<u32, D>, T5: Encode<u32, D>, T6: Encode<u32, D>, T7: Encode<ColorSpace, D>, T8: Encode<bool, D>, T9: Encode<u32, D>, T10: Encode<u32, D>> Encode<ImageFormat2, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Source§impl Hash for ImageFormat2
impl Hash for ImageFormat2
Source§impl Ord for ImageFormat2
impl Ord for ImageFormat2
Source§fn cmp(&self, other: &ImageFormat2) -> Ordering
fn cmp(&self, other: &ImageFormat2) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ImageFormat2
impl PartialEq for ImageFormat2
Source§impl PartialOrd for ImageFormat2
impl PartialOrd for ImageFormat2
Source§impl TypeMarker for ImageFormat2
impl TypeMarker for ImageFormat2
Source§type Owned = ImageFormat2
type Owned = ImageFormat2
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for ImageFormat2
impl ValueTypeMarker for ImageFormat2
Source§type Borrowed<'a> = &'a ImageFormat2
type Borrowed<'a> = &'a ImageFormat2
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for ImageFormat2
impl Eq for ImageFormat2
impl Persistable for ImageFormat2
impl StructuralPartialEq for ImageFormat2
Auto Trait Implementations§
impl Freeze for ImageFormat2
impl RefUnwindSafe for ImageFormat2
impl Send for ImageFormat2
impl Sync for ImageFormat2
impl Unpin for ImageFormat2
impl UnwindSafe for ImageFormat2
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)