pub struct PrecomputedReference { /* private fields */ }Expand description
Pre-computed reference image data for batch comparison against multiple distorted images.
Caches the reference image’s XYB color-space planes and downscale pyramid so that sRGB→XYB conversion and pyramid construction happen once, not once per distorted image. At 4K this saves ~25% per comparison; at 8K, ~34%. Breaks even at 3-7 distorted images per reference depending on resolution.
§Memory
Holds 3 f32 planes at each pyramid scale (4 scales by default).
Total ≈ width × height × 4 bytes × 3 channels × 1.33 (geometric sum of pyramid).
For a 3840×2160 image: ~133 MB. For 7680×4320: ~532 MB.
Created via Zensim::precompute_reference.
Auto Trait Implementations§
impl Freeze for PrecomputedReference
impl RefUnwindSafe for PrecomputedReference
impl Send for PrecomputedReference
impl Sync for PrecomputedReference
impl Unpin for PrecomputedReference
impl UnsafeUnpin for PrecomputedReference
impl UnwindSafe for PrecomputedReference
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> 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