pub enum Depth {
Eight,
Ten,
Twelve,
}Expand description
Bit depth of a source’s samples.
Normalisation divides by Depth::max_value, so a value in
normalised units means the same thing at every depth.
Variants§
Implementations§
Source§impl Depth
impl Depth
Sourcepub fn from_bits(bits: usize) -> Result<Depth, UnsupportedDepthError>
pub fn from_bits(bits: usize) -> Result<Depth, UnsupportedDepthError>
Maps a declared bit depth onto a Depth.
Sourcepub fn bytes_per_sample(self) -> usize
pub fn bytes_per_sample(self) -> usize
Bytes each sample takes up on the wire.
Depths above 8 use a little-endian 16-bit word.
Sourcepub fn max_value(self) -> f32
pub fn max_value(self) -> f32
The largest sample value this depth can hold, which is also the normalisation divisor.
Sourcepub fn neutral_chroma(self) -> u16
pub fn neutral_chroma(self) -> u16
The sample value that means neutral chroma at this depth.
Trait Implementations§
impl Copy for Depth
impl Eq for Depth
impl StructuralPartialEq for Depth
Auto Trait Implementations§
impl Freeze for Depth
impl RefUnwindSafe for Depth
impl Send for Depth
impl Sync for Depth
impl Unpin for Depth
impl UnsafeUnpin for Depth
impl UnwindSafe for Depth
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.