#[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_intVerbosity level - show more information, collects duration of each phase, etc. @sa @ref verbosity for values
perf_stats: c_int§quality: c_intEncoder quality level (0-100)
restart_interval: c_intRestart interval (0 means that restart interval is disabled and CPU huffman coder is used) @sa @rf restart_int for special values
interleaved: c_intFlag 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_intUse 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_intJPEG 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_spaceColor 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
impl Clone for gpujpeg_parameters
Source§fn clone(&self) -> gpujpeg_parameters
fn clone(&self) -> gpujpeg_parameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more