pub struct ButteraugliParams { /* private fields */ }Expand description
Butteraugli parameters (from butteraugli).
Configure intensity target, HF asymmetry, and other parameters. Butteraugli comparison parameters.
Use the builder pattern to construct:
use butteraugli::ButteraugliParams;
let params = ButteraugliParams::new()
.with_intensity_target(250.0) // HDR display
.with_hf_asymmetry(1.5) // Penalize new artifacts more
.with_compute_diffmap(true); // Generate per-pixel difference mapImplementations§
Source§impl ButteraugliParams
impl ButteraugliParams
Sourcepub fn new() -> ButteraugliParams
pub fn new() -> ButteraugliParams
Creates a new ButteraugliParams with default values.
Sourcepub fn with_intensity_target(self, intensity_target: f32) -> ButteraugliParams
pub fn with_intensity_target(self, intensity_target: f32) -> ButteraugliParams
Sets the intensity target (display brightness in nits).
Sourcepub fn with_hf_asymmetry(self, hf_asymmetry: f32) -> ButteraugliParams
pub fn with_hf_asymmetry(self, hf_asymmetry: f32) -> ButteraugliParams
Sets the HF asymmetry multiplier. Values > 1.0 penalize new high-frequency artifacts more than blurring.
Sourcepub fn with_xmul(self, xmul: f32) -> ButteraugliParams
pub fn with_xmul(self, xmul: f32) -> ButteraugliParams
Sets the X channel multiplier.
Sourcepub fn with_compute_diffmap(self, compute_diffmap: bool) -> ButteraugliParams
pub fn with_compute_diffmap(self, compute_diffmap: bool) -> ButteraugliParams
Sets whether to compute the per-pixel difference map.
When true, the result will include an ImgVec<f32> difference map.
When false (default), the diffmap field will be None, which is faster.
Sourcepub fn hf_asymmetry(&self) -> f32
pub fn hf_asymmetry(&self) -> f32
Returns the HF asymmetry multiplier.
Sourcepub fn intensity_target(&self) -> f32
pub fn intensity_target(&self) -> f32
Returns the intensity target in nits.
Sourcepub fn compute_diffmap(&self) -> bool
pub fn compute_diffmap(&self) -> bool
Returns whether to compute the per-pixel difference map.
Trait Implementations§
Source§impl Clone for ButteraugliParams
impl Clone for ButteraugliParams
Source§fn clone(&self) -> ButteraugliParams
fn clone(&self) -> ButteraugliParams
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 ButteraugliParams
impl Debug for ButteraugliParams
Source§impl Default for ButteraugliParams
impl Default for ButteraugliParams
Source§fn default() -> ButteraugliParams
fn default() -> ButteraugliParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ButteraugliParams
impl RefUnwindSafe for ButteraugliParams
impl Send for ButteraugliParams
impl Sync for ButteraugliParams
impl Unpin for ButteraugliParams
impl UnwindSafe for ButteraugliParams
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