pub struct ParamNlt { /* private fields */ }Expand description
NLT marker segment — non-linearity point transformation.
Provides per-component non-linear transforms (e.g. two’s-complement conversion for signed data).
Implementations§
Source§impl ParamNlt
impl ParamNlt
Sourcepub fn set_nonlinear_transform(
&mut self,
comp_num: u32,
nl_type: u8,
) -> Result<()>
pub fn set_nonlinear_transform( &mut self, comp_num: u32, nl_type: u8, ) -> Result<()>
Sets the non-linear transform type for a specific component.
nl_type = 0— no NLTnl_type = 3— binary complement (two’s-complement conversion)
§Errors
Returns OjphError::Unsupported if nl_type is not 0 or 3.
Sourcepub fn get_nonlinear_transform(&self, comp_num: u32) -> Option<(u8, bool, u8)>
pub fn get_nonlinear_transform(&self, comp_num: u32) -> Option<(u8, bool, u8)>
Returns (bit_depth, is_signed, nl_type) for a component,
or None if no NLT is configured.
Sourcepub fn is_any_enabled(&self) -> bool
pub fn is_any_enabled(&self) -> bool
Returns true if any component has an NLT configured.
pub fn write(&self, file: &mut dyn OutfileBase) -> Result<bool>
pub fn read(&mut self, file: &mut dyn InfileBase) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParamNlt
impl RefUnwindSafe for ParamNlt
impl Send for ParamNlt
impl Sync for ParamNlt
impl Unpin for ParamNlt
impl UnsafeUnpin for ParamNlt
impl UnwindSafe for ParamNlt
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