#[repr(transparent)]pub struct AspectRatioIdc(pub u8);
Expand description
The AspectRatioIdc
is a nutype enum for aspect_ratio_idc
as defined in
ISO/IEC-14496-10-2022 - E.2.1 Table E-1.
Values 17..=254** are reserved (should be ignored if encountered)
Value 255 (ExtendedSar
) indicates that the aspect ratio is specified by
additional fields (sar_width
and sar_height
) in the bitstream.
§Examples of aspect_ratio_idc values:
1
=> 1:1 (“square”)4
=> 16:1114
=> 4:315
=> 3:216
=> 2:1
Tuple Fields§
§0: u8
Implementations§
Source§impl AspectRatioIdc
impl AspectRatioIdc
Sourcepub const Unspecified: Self
pub const Unspecified: Self
0: Unspecified (not used in decoding)
Sourcepub const Square: Self
pub const Square: Self
1: 1:1 (square)
§Examples
- 7680 x 4320 16:9 w/o horizontal overscan
- 3840 x 2160 16:9 w/o horizontal overscan
- 1280 x 720 16:9 w/o horizontal overscan
- 1920 x 1080 16:9 w/o horizontal overscan (cropped from 1920x1088)
- 640 x 480 4:3 w/o horizontal overscan
Sourcepub const Aspect12_11: Self
pub const Aspect12_11: Self
Sourcepub const Aspect10_11: Self
pub const Aspect10_11: Self
Sourcepub const Aspect16_11: Self
pub const Aspect16_11: Self
Sourcepub const Aspect40_33: Self
pub const Aspect40_33: Self
Sourcepub const Aspect24_11: Self
pub const Aspect24_11: Self
Sourcepub const Aspect20_11: Self
pub const Aspect20_11: Self
Sourcepub const Aspect32_11: Self
pub const Aspect32_11: Self
Sourcepub const Aspect80_33: Self
pub const Aspect80_33: Self
Sourcepub const Aspect18_11: Self
pub const Aspect18_11: Self
Sourcepub const Aspect15_11: Self
pub const Aspect15_11: Self
Sourcepub const Aspect64_33: Self
pub const Aspect64_33: Self
Sourcepub const Aspect160_99: Self
pub const Aspect160_99: Self
Sourcepub const ExtendedSar: Self
pub const ExtendedSar: Self
255: Extended SAR (use sar_width
& sar_height
from bitstream)
Trait Implementations§
Source§impl Clone for AspectRatioIdc
impl Clone for AspectRatioIdc
Source§fn clone(&self) -> AspectRatioIdc
fn clone(&self) -> AspectRatioIdc
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AspectRatioIdc
impl Debug for AspectRatioIdc
Source§impl From<AspectRatioIdc> for u8
impl From<AspectRatioIdc> for u8
Source§fn from(value: AspectRatioIdc) -> Self
fn from(value: AspectRatioIdc) -> Self
Converts to this type from the input type.
Source§impl From<u8> for AspectRatioIdc
impl From<u8> for AspectRatioIdc
Source§impl Hash for AspectRatioIdc
impl Hash for AspectRatioIdc
Source§impl Ord for AspectRatioIdc
impl Ord for AspectRatioIdc
Source§fn cmp(&self, other: &AspectRatioIdc) -> Ordering
fn cmp(&self, other: &AspectRatioIdc) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AspectRatioIdc
impl PartialEq for AspectRatioIdc
Source§impl PartialOrd for AspectRatioIdc
impl PartialOrd for AspectRatioIdc
impl Copy for AspectRatioIdc
impl Eq for AspectRatioIdc
impl StructuralPartialEq for AspectRatioIdc
Auto Trait Implementations§
impl Freeze for AspectRatioIdc
impl RefUnwindSafe for AspectRatioIdc
impl Send for AspectRatioIdc
impl Sync for AspectRatioIdc
impl Unpin for AspectRatioIdc
impl UnwindSafe for AspectRatioIdc
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
Mutably borrows from an owned value. Read more