pub struct EncoderParameters {Show 44 fields
pub tile_size_on: bool,
pub cp_tx0: i32,
pub cp_ty0: i32,
pub cp_tdx: i32,
pub cp_tdy: i32,
pub cp_disto_alloc: i32,
pub cp_fixed_alloc: i32,
pub cp_fixed_quality: i32,
pub cp_matrice: Option<Vec<i32>>,
pub cp_comment: Option<Vec<u8>>,
pub csty: i32,
pub prog_order: ProgressionOrder,
pub pocs: [Poc; 32],
pub numpocs: u32,
pub tcp_numlayers: i32,
pub tcp_rates: [f32; 100],
pub tcp_distoratio: [f32; 100],
pub numresolution: i32,
pub cblockw_init: i32,
pub cblockh_init: i32,
pub mode: i32,
pub irreversible: i32,
pub roi_compno: i32,
pub roi_shift: i32,
pub res_spec: i32,
pub prcw_init: [i32; 33],
pub prch_init: [i32; 33],
pub index_on: i32,
pub image_offset_x0: i32,
pub image_offset_y0: i32,
pub subsampling_dx: i32,
pub subsampling_dy: i32,
pub decod_format: i32,
pub cod_format: i32,
pub cp_cinema: u32,
pub max_comp_size: i32,
pub cp_rsiz: u16,
pub tp_on: i8,
pub tp_flag: i8,
pub tcp_mct: i8,
pub jpip_on: i32,
pub mct_data: Option<(Vec<f32>, Vec<i32>)>,
pub max_cs_size: i32,
pub rsiz: u16,
}Expand description
Safe, owned encoder parameters. The C ABI mirror (EncoderParameters)
is marshalled into this by the capi crate; the tools build it directly.
Fields§
§tile_size_on: boolSize of tiles on by default (true = use cp_tdx x cp_tdy).
cp_tx0: i32Origin of the tile grid in x.
cp_ty0: i32Origin of the tile grid in y.
cp_tdx: i32Tile width.
cp_tdy: i32Tile height.
cp_disto_alloc: i32Allocation by rate/distortion.
cp_fixed_alloc: i32Allocation by fixed layer.
cp_fixed_quality: i32Add fixed_quality.
cp_matrice: Option<Vec<i32>>Fixed layer allocation matrix.
cp_comment: Option<Vec<u8>>Restrict to a comment (COM marker).
csty: i32Coding style (see the COD marker).
prog_order: ProgressionOrderProgression order.
pocs: [Poc; 32]Progression-order changes.
numpocs: u32Number of progression-order changes in pocs.
tcp_numlayers: i32Number of quality layers.
tcp_rates: [f32; 100]Rate of each layer (lossy).
tcp_distoratio: [f32; 100]Distortion ratio of each layer.
numresolution: i32Number of decomposition levels.
cblockw_init: i32Initial code-block width exponent.
cblockh_init: i32Initial code-block height exponent.
mode: i32Coding mode (LAZY/RESET/TERMALL/VSC/PTERM/SEGSYM bits).
irreversible: i321 = irreversible 9-7, 0 = reversible 5-3.
roi_compno: i32Region-of-interest component.
roi_shift: i32Region-of-interest shift (0 disables ROI).
res_spec: i32Number of precinct sizes.
prcw_init: [i32; 33]Precinct widths per resolution.
prch_init: [i32; 33]Precinct heights per resolution.
index_on: i32Request a codestream index (unused upstream; reserved).
image_offset_x0: i32Image offset in x.
image_offset_y0: i32Image offset in y.
subsampling_dx: i32Component subsampling in x.
subsampling_dy: i32Component subsampling in y.
decod_format: i32Input file format (J2KFormat; the C’s OPJ_CODEC_* values).
cod_format: i32Output file format (J2KFormat; the C’s OPJ_CODEC_* values).
cp_cinema: u32Cinema profile mode.
max_comp_size: i32Maximum compressed size.
cp_rsiz: u16Profile bits (e.g. ColorTransform enables the custom-MCT marker
emission).
tp_on: i8Write tile-part markers ('R'/'C' style flags).
tp_flag: i8Tile-part flag character.
tcp_mct: i8Component transform (1 = standard MCT; 2 = custom MCT).
jpip_on: i32Write JPIP index boxes (unused upstream; reserved).
mct_data: Option<(Vec<f32>, Vec<i32>)>Custom MCT: the decorrelation matrix (row-major, n*n entries) and
the per-component DC level shifts. Setting this also sets mct = 2
in the COD marker; the encoder emits the MCT/MCC/MCO markers when
rsiz carries the ColorTransform bits.
max_cs_size: i32Maximum codestream size.
rsiz: u16Profile (RsizCapabilities bits; e.g. ColorTransform enables the
custom-MCT marker emission).
Trait Implementations§
Source§impl Clone for EncoderParameters
impl Clone for EncoderParameters
Source§fn clone(&self) -> EncoderParameters
fn clone(&self) -> EncoderParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncoderParameters
impl Debug for EncoderParameters
Source§impl Default for EncoderParameters
impl Default for EncoderParameters
Source§fn default() -> EncoderParameters
fn default() -> EncoderParameters
Auto Trait Implementations§
impl Forget for EncoderParameters
impl Freeze for EncoderParameters
impl Move for EncoderParameters
impl RefUnwindSafe for EncoderParameters
impl Send for EncoderParameters
impl Sync for EncoderParameters
impl Unpin for EncoderParameters
impl UnsafeUnpin for EncoderParameters
impl UnwindSafe for EncoderParameters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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