Struct gpujpeg_parameters

Source
#[repr(C)]
pub struct gpujpeg_parameters { pub verbose: c_int, pub perf_stats: c_int, pub quality: c_int, pub restart_interval: c_int, pub interleaved: c_int, pub segment_info: c_int, pub comp_count: c_int, pub sampling_factor: [gpujpeg_component_sampling_factor; 4], pub color_space_internal: gpujpeg_color_space, }
Expand description

JPEG parameters. This structure should not be initialized only be hand, but at first gpujpeg_set_default_parameters should be call and then some parameters could be changed.

Fields§

§verbose: c_int

Verbosity level - show more information, collects duration of each phase, etc. @sa @ref verbosity for values

§perf_stats: c_int§quality: c_int

Encoder quality level (0-100)

§restart_interval: c_int

Restart interval (0 means that restart interval is disabled and CPU huffman coder is used) @sa @rf restart_int for special values

§interleaved: c_int

Flag which determines if interleaved format of JPEG stream should be used, "1" = only one scan which includes all color components (e.g. Y Cb Cr Y Cb Cr …), or "0" = one scan for each color component (e.g. Y Y Y …, Cb Cb Cb …, Cr Cr Cr …)

§segment_info: c_int

Use segment info in stream for fast decoding. The segment info is placed into special application headers and contains indexes to beginnings of segments in the stream, so the decoder don’t have to parse the stream byte-by-byte but he can only read the segment info and start decoding. The segment info is presented for each scan, and thus the best result is achieved when it is used in combination with "interleaved = 1" settings.

§comp_count: c_int

JPEG image component count; count of valid sampling_factor elements use gpujpeg_parameters_chroma_subsampling() to set comp_count and sampling_factor

§sampling_factor: [gpujpeg_component_sampling_factor; 4]

Sampling factors for each color component inside JPEG stream.

§color_space_internal: gpujpeg_color_space

Color space that is used inside JPEG stream = that is carried in JPEG format = to which are input data converted. Default value is @ref GPUJPEG_YCBCR_JPEG, changing it will change the JPEG format from @ref GPUJPEG_HEADER_JFIF "JFIF" (see also @ref gpujpeg_encoder_set_jpeg_header).

  • encoding: Set by user
  • decoding: Set by gpujpeg

Trait Implementations§

Source§

impl Clone for gpujpeg_parameters

Source§

fn clone(&self) -> gpujpeg_parameters

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for gpujpeg_parameters

Source§

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

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

impl Copy for gpujpeg_parameters

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.