pub struct WeightedPredictorState { /* private fields */ }Expand description
Full weighted predictor state for adaptive prediction. Matches libjxl/jxl-rs implementation for encoding parity.
Implementations§
Source§impl WeightedPredictorState
impl WeightedPredictorState
Sourcepub fn new(params: &WeightedPredictorParams, xsize: usize) -> Self
pub fn new(params: &WeightedPredictorParams, xsize: usize) -> Self
Creates a new weighted predictor state.
Sourcepub fn with_defaults(xsize: usize) -> Self
pub fn with_defaults(xsize: usize) -> Self
Creates with default parameters.
Sourcepub fn predict_and_property(
&mut self,
x: usize,
y: usize,
xsize: usize,
neighbors: &Neighbors,
) -> (i64, i32)
pub fn predict_and_property( &mut self, x: usize, y: usize, xsize: usize, neighbors: &Neighbors, ) -> (i64, i32)
Compute prediction and property value. Returns (prediction, max_error_property).
Trait Implementations§
Source§impl Debug for WeightedPredictorState
impl Debug for WeightedPredictorState
Auto Trait Implementations§
impl Freeze for WeightedPredictorState
impl RefUnwindSafe for WeightedPredictorState
impl Send for WeightedPredictorState
impl Sync for WeightedPredictorState
impl Unpin for WeightedPredictorState
impl UnwindSafe for WeightedPredictorState
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