Skip to main content

Module params

Module params 

Source
Expand description

JPEG 2000 codestream parameter marker segments (SIZ, COD, QCD, etc.)

Port of ojph_params.h, ojph_params_local.h, and ojph_params.cpp.

These types represent the marker segments that form the main header of a JPEG 2000 Part 15 (HTJ2K) codestream:

TypeMarkerDescription
ParamSizSIZImage and tile size, component info
ParamCodCOD/COCCoding style defaults / per-component
ParamQcdQCD/QCCQuantization defaults / per-component
ParamCapCAPExtended capabilities
ParamSotSOTStart of tile-part header
ParamTlmTLMTile-part length marker
ParamNltNLTNon-linearity point transformation
ParamDfsDFSDownsampling factor styles
CommentExchangeCOMComment marker data

§Configuration example

use openjph_core::params::{ParamSiz, ParamCod};
use openjph_core::codestream::Codestream;
use openjph_core::types::{Point, Size};

let mut cs = Codestream::new();

// Configure image geometry
cs.access_siz_mut().set_image_extent(Point::new(1920, 1080));
cs.access_siz_mut().set_num_components(3);
for c in 0..3 {
    cs.access_siz_mut().set_comp_info(c, Point::new(1, 1), 8, false);
}
cs.access_siz_mut().set_tile_size(Size::new(1920, 1080));

// Configure coding style
cs.access_cod_mut().set_num_decomposition(5);
cs.access_cod_mut().set_reversible(true);
cs.access_cod_mut().set_color_transform(true);

Structs§

CommentExchange
COM marker data for exchange between caller and encoder.
ParamCap
CAP marker segment — extended capability descriptor.
ParamCod
COD/COC marker segment — coding style parameters.
ParamDfs
DFS marker segment — downsampling factor styles.
ParamNlt
NLT marker segment — non-linearity point transformation.
ParamQcd
QCD/QCC marker segment — quantization parameters.
ParamSiz
SIZ marker segment — image and tile size parameters.
ParamSot
SOT marker segment — start of tile-part header.
ParamTlm
TLM marker segment — tile-part length index.
TtlmPtlmPair
A single (tile-index, tile-part-length) pair in a TLM marker.

Enums§

ProfileNum
JPEG 2000 codestream profile identifiers.
ProgressionOrder
JPEG 2000 progression order for packet sequencing.