pub enum PerceptionLevel {
Imperceptible,
Marginal,
Subtle,
Noticeable,
Degraded,
}Expand description
Perceptual quality level based on metric thresholds.
Variants§
Imperceptible
DSSIM < 0.0003 - Visually identical.
Marginal
DSSIM < 0.0007 - Only A/B comparison reveals difference.
Subtle
DSSIM < 0.0015 - Barely noticeable.
Noticeable
DSSIM < 0.003 - Visible on inspection.
Degraded
DSSIM >= 0.003 - Clearly visible artifacts.
Implementations§
Source§impl PerceptionLevel
impl PerceptionLevel
Sourcepub fn from_dssim(dssim: f64) -> Self
pub fn from_dssim(dssim: f64) -> Self
Determine perception level from DSSIM value.
Sourcepub fn from_ssimulacra2(score: f64) -> Self
pub fn from_ssimulacra2(score: f64) -> Self
Determine perception level from SSIMULACRA2 value. SSIMULACRA2 is higher-is-better (100 = identical).
Sourcepub fn from_butteraugli(score: f64) -> Self
pub fn from_butteraugli(score: f64) -> Self
Determine perception level from Butteraugli value. Butteraugli is lower-is-better (<1.0 = imperceptible).
Sourcepub fn min_ssimulacra2(self) -> f64
pub fn min_ssimulacra2(self) -> f64
Get the minimum SSIMULACRA2 value for this perception level.
Sourcepub fn max_butteraugli(self) -> f64
pub fn max_butteraugli(self) -> f64
Get the maximum Butteraugli value for this perception level.
Trait Implementations§
Source§impl Clone for PerceptionLevel
impl Clone for PerceptionLevel
Source§fn clone(&self) -> PerceptionLevel
fn clone(&self) -> PerceptionLevel
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 PerceptionLevel
impl Debug for PerceptionLevel
Source§impl<'de> Deserialize<'de> for PerceptionLevel
impl<'de> Deserialize<'de> for PerceptionLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PerceptionLevel
impl Display for PerceptionLevel
Source§impl PartialEq for PerceptionLevel
impl PartialEq for PerceptionLevel
Source§impl Serialize for PerceptionLevel
impl Serialize for PerceptionLevel
impl Copy for PerceptionLevel
impl Eq for PerceptionLevel
impl StructuralPartialEq for PerceptionLevel
Auto Trait Implementations§
impl Freeze for PerceptionLevel
impl RefUnwindSafe for PerceptionLevel
impl Send for PerceptionLevel
impl Sync for PerceptionLevel
impl Unpin for PerceptionLevel
impl UnwindSafe for PerceptionLevel
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more