Skip to main content

OlympusParams

Struct OlympusParams 

Source
pub struct OlympusParams {
Show 14 fields pub extra_bits: u32, pub grad_shift: u32, pub edge_pred: i32, pub low_bits: u32, pub smooth_shift: u32, pub small_shift: u32, pub run_switch: i32, pub run_offset: i32, pub run_threshold: i32, pub base_offset: i32, pub base_threshold: i32, pub max_wbits: i32, pub max_high: u32, pub header_len: u32,
}
Expand description

Coder parameters (makernote ImageProcessing tags 0x640..0x653).

Fields§

§extra_bits: u32

0x640: extra literal low bits per sample (value is shifted left by this).

§grad_shift: u32

0x641: log2 of the gradient threshold of the predictor.

§edge_pred: i32

0x642: prediction used outside the image (first rows/columns).

§low_bits: u32

0x643: literal low bits coded before the adaptive part (0, 1 or 2).

§smooth_shift: u32

0x644: smoothing shift of the residual accumulator (15 disables it).

§small_shift: u32

0x645: codes up to 1 << small_shift count as “small” for the run counter.

§run_switch: i32

0x646: run length of small codes that switches to the fine width model.

§run_offset: i32

0x647/0x648: width model after a run (offset, magnitude threshold).

§run_threshold: i32§base_offset: i32

0x649/0x650: default width model (offset, magnitude threshold).

§base_threshold: i32§max_wbits: i32

0x651: maximum adaptive width.

§max_high: u32

0x652: unary escape length.

§header_len: u32

0x653: length of the big-endian stream header (value 1) preceding two zero bytes.

Implementations§

Source§

impl OlympusParams

Source

pub fn from_tags(t: &[Option<u32>; 14]) -> Self

Build from the 14 tag values 0x640..=0x653 (None = default).

Trait Implementations§

Source§

impl Clone for OlympusParams

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for OlympusParams

Source§

impl Debug for OlympusParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OlympusParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for OlympusParams

Source§

impl PartialEq for OlympusParams

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OlympusParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.