pub struct FixedFrame {
pub bpp_max: f64,
pub s2_max: f64,
pub ba_max: f64,
pub aspect: f64,
}Expand description
Fixed normalization frame for web-targeted R-D analysis.
Uses metric-native scales and an aspect ratio calibrated so the reference knee (mozjpeg 4:2:0 on CID22) lands at exactly 45 degrees. Angles are comparable across codecs and corpora.
Fields§
§bpp_max: f64Maximum bpp (practical ceiling). Default: 4.0 for web.
s2_max: f64SSIMULACRA2 scale maximum. Always 100.
ba_max: f64Butteraugli practical worst-case. Default: 15.0.
aspect: f64Quality-axis stretch factor. Calibrated from reference knee so
that atan2(q_norm * aspect, 1 - bpp_norm) = 45 deg at the knee.
Implementations§
Source§impl FixedFrame
impl FixedFrame
Sourcepub const WEB: Self
pub const WEB: Self
Standard web-targeting frame.
Aspect ratio calibrated from CID22-training mozjpeg 4:2:0 s2 knee
at (0.7274 bpp, s2=65.10):
aspect = (1 - 0.7274/4.0) / (65.10/100.0) = 1.2568
Sourcepub fn s2_angle(&self, bpp: f64, s2: f64) -> f64
pub fn s2_angle(&self, bpp: f64, s2: f64) -> f64
Compute the corner angle for an SSIMULACRA2 measurement.
Origin is the worst corner: (bpp_max, s2=0). The aspect ratio stretches the quality axis so the reference knee is at 45 degrees. Angles can exceed 90 degrees or go below 0 degrees for extreme encodes.
Trait Implementations§
Source§impl Clone for FixedFrame
impl Clone for FixedFrame
Source§fn clone(&self) -> FixedFrame
fn clone(&self) -> FixedFrame
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FixedFrame
impl Debug for FixedFrame
Source§impl Default for FixedFrame
impl Default for FixedFrame
Source§impl<'de> Deserialize<'de> for FixedFrame
impl<'de> Deserialize<'de> for FixedFrame
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>,
Source§impl Serialize for FixedFrame
impl Serialize for FixedFrame
impl Copy for FixedFrame
Auto Trait Implementations§
impl Freeze for FixedFrame
impl RefUnwindSafe for FixedFrame
impl Send for FixedFrame
impl Sync for FixedFrame
impl Unpin for FixedFrame
impl UnwindSafe for FixedFrame
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
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>
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>
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