#[repr(transparent)]pub struct SDL_ChromaLocation(pub c_uint);Expand description
Colorspace chroma sample location.
§Availability
This enum is available since SDL 3.2.0.
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
NONE | SDL_CHROMA_LOCATION_NONE | RGB, no chroma sampling |
LEFT | SDL_CHROMA_LOCATION_LEFT | In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically. |
CENTER | SDL_CHROMA_LOCATION_CENTER | In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel. |
TOPLEFT | SDL_CHROMA_LOCATION_TOPLEFT | In HEVC for BT.2020 and BT.2100 content (in particular on Blu-rays), Cb and Cr are sampled at the same location as the group’s top-left Y pixel (“co-sited”, “co-located”). |
Tuple Fields§
§0: c_uintImplementations§
Source§impl SDL_ChromaLocation
impl SDL_ChromaLocation
Sourcepub const LEFT: Self
pub const LEFT: Self
In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.
Trait Implementations§
Source§impl Clone for SDL_ChromaLocation
impl Clone for SDL_ChromaLocation
Source§fn clone(&self) -> SDL_ChromaLocation
fn clone(&self) -> SDL_ChromaLocation
Returns a duplicate 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 SDL_ChromaLocation
Available on crate feature debug-impls only.
impl Debug for SDL_ChromaLocation
Available on crate feature
debug-impls only.Source§impl Default for SDL_ChromaLocation
impl Default for SDL_ChromaLocation
Source§fn default() -> SDL_ChromaLocation
fn default() -> SDL_ChromaLocation
Returns the “default value” for a type. Read more
Source§impl From<SDL_ChromaLocation> for c_uint
impl From<SDL_ChromaLocation> for c_uint
Source§fn from(value: SDL_ChromaLocation) -> Self
fn from(value: SDL_ChromaLocation) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_ChromaLocation
Available on crate feature metadata only.
impl GroupMetadata for SDL_ChromaLocation
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_ChromaLocation
impl Hash for SDL_ChromaLocation
Source§impl Ord for SDL_ChromaLocation
impl Ord for SDL_ChromaLocation
Source§fn cmp(&self, other: &SDL_ChromaLocation) -> Ordering
fn cmp(&self, other: &SDL_ChromaLocation) -> 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<SDL_ChromaLocation> for c_uint
impl PartialEq<SDL_ChromaLocation> for c_uint
Source§impl PartialEq<u32> for SDL_ChromaLocation
impl PartialEq<u32> for SDL_ChromaLocation
Source§impl PartialEq for SDL_ChromaLocation
impl PartialEq for SDL_ChromaLocation
Source§impl PartialOrd for SDL_ChromaLocation
impl PartialOrd for SDL_ChromaLocation
impl Copy for SDL_ChromaLocation
impl Eq for SDL_ChromaLocation
impl StructuralPartialEq for SDL_ChromaLocation
Auto Trait Implementations§
impl Freeze for SDL_ChromaLocation
impl RefUnwindSafe for SDL_ChromaLocation
impl Send for SDL_ChromaLocation
impl Sync for SDL_ChromaLocation
impl Unpin for SDL_ChromaLocation
impl UnwindSafe for SDL_ChromaLocation
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