opj_cparameters Struct Reference

Compression parameters. More...

`#include <openjpeg.h>`

## Data Fields

OPJ_BOOL | tile_size_on
| size of tile: tile_size_on = false (not in argument) or = true (in argument)
int | cp_tx0
| XTOsiz.
int | cp_ty0
| YTOsiz.
int | cp_tdx
| XTsiz.
int | cp_tdy
| YTsiz.
int | cp_disto_alloc
| allocation by rate/distortion
int | cp_fixed_alloc
| allocation by fixed layer
int | cp_fixed_quality
| allocation by fixed quality (PSNR)
int * | cp_matrice
| fixed layer
char * | cp_comment
| comment for coding
int | csty
| csty : coding style
OPJ_PROG_ORDER | prog_order
| progression order (default OPJ_LRCP)
opj_poc_t | POC [32]
| progression order changes
OPJ_UINT32 | numpocs
| number of progression order changes (POC), default to 0
int | tcp_numlayers
| number of layers
float | tcp_rates [100]
| rates of layers - might be subsequently limited by the max_cs_size field.
float | tcp_distoratio [100]
| different psnr for successive layers.
int | numresolution
| number of resolutions
int | cblockw_init
| initial code block width, default to 64
int | cblockh_init
| initial code block height, default to 64
int | mode
| mode switch (cblk_style)
int | irreversible
| 1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
int | roi_compno
| region of interest: affected component in [0..3], -1 means no ROI
int | roi_shift
| region of interest: upshift value
int | res_spec
int | prcw_init [OPJ_J2K_MAXRLVLS]
| initial precinct width
int | prch_init [OPJ_J2K_MAXRLVLS]
| initial precinct height
command line encoder parameters (not used inside the library)
char | infile [OPJ_PATH_LEN]
| input file name
char | outfile [OPJ_PATH_LEN]
| output file name
int | index_on
| DEPRECATED.
char | index [OPJ_PATH_LEN]
| DEPRECATED.
int | image_offset_x0
| subimage encoding: origin image offset in x direction
int | image_offset_y0
| subimage encoding: origin image offset in y direction
int | subsampling_dx
| subsampling value for dx
int | subsampling_dy
| subsampling value for dy
int | decod_format
| input file format 0: PGX, 1: PxM, 2: BMP 3:TIF
int | cod_format
| output file format 0: J2K, 1: JP2, 2: JPT
JPWL encoding parameters
OPJ_BOOL | jpwl_epc_on
| enables writing of EPC in MH, thus activating JPWL
int | jpwl_hprot_MH
| error protection method for MH (0,1,16,32,37-128)
int | jpwl_hprot_TPH_tileno [JPWL_MAX_NO_TILESPECS]
| tile number of header protection specification (>=0)
int | jpwl_hprot_TPH [JPWL_MAX_NO_TILESPECS]
| error protection methods for TPHs (0,1,16,32,37-128)
int | jpwl_pprot_tileno [JPWL_MAX_NO_PACKSPECS]
| tile number of packet protection specification (>=0)
int | jpwl_pprot_packno [JPWL_MAX_NO_PACKSPECS]
| packet number of packet protection specification (>=0)
int | jpwl_pprot [JPWL_MAX_NO_PACKSPECS]
| error protection methods for packets (0,1,16,32,37-128)
int | jpwl_sens_size
| enables writing of ESD, (0=no/1/2 bytes)
int | jpwl_sens_addr
| sensitivity addressing size (0=auto/2/4 bytes)
int | jpwl_sens_range
| sensitivity range (0-3)
int | jpwl_sens_MH
| sensitivity method for MH (-1=no,0-7)
int | jpwl_sens_TPH_tileno [JPWL_MAX_NO_TILESPECS]
| tile number of sensitivity specification (>=0)
int | jpwl_sens_TPH [JPWL_MAX_NO_TILESPECS]
| sensitivity methods for TPHs (-1=no,0-7)
OPJ_CINEMA_MODE | cp_cinema
| DEPRECATED: use RSIZ, OPJ_PROFILE_* and MAX_COMP_SIZE instead Digital Cinema compliance 0-not compliant, 1-compliant.
int | max_comp_size
| Maximum size (in bytes) for each component.
OPJ_RSIZ_CAPABILITIES | cp_rsiz
| DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Profile name.
char | tp_on
| Tile part generation.
char | tp_flag
| Flag for Tile part generation.
char | tcp_mct
| MCT (multiple component transform).
OPJ_BOOL | jpip_on
| Enable JPIP indexing.
void * | mct_data
| Naive implementation of MCT restricted to a single reversible array based encoding without offset concerning all the components.
int | max_cs_size
| Maximum size (in bytes) for the whole codestream.
OPJ_UINT16 | rsiz
| RSIZ value To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels values.

## Detailed Description

Compression parameters.

## Field Documentation

## cblockh_init

int opj_cparameters::cblockh_init

initial code block height, default to 64

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cblockw_init

int opj_cparameters::cblockw_init

initial code block width, default to 64

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cod_format

int opj_cparameters::cod_format

output file format 0: J2K, 1: JP2, 2: JPT

Referenced by opj_set_default_encoder_parameters().

## cp_cinema

OPJ_CINEMA_MODE opj_cparameters::cp_cinema

DEPRECATED: use RSIZ, OPJ_PROFILE_* and MAX_COMP_SIZE instead Digital Cinema compliance 0-not compliant, 1-compliant.

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cp_comment

char* opj_cparameters::cp_comment

comment for coding

Referenced by opj_j2k_setup_encoder().

## cp_disto_alloc

int opj_cparameters::cp_disto_alloc

allocation by rate/distortion

Referenced by opj_j2k_set_cinema_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cp_fixed_alloc

int opj_cparameters::cp_fixed_alloc

allocation by fixed layer

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cp_fixed_quality

int opj_cparameters::cp_fixed_quality

allocation by fixed quality (PSNR)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cp_matrice

int* opj_cparameters::cp_matrice

fixed layer

Referenced by opj_j2k_setup_encoder().

## cp_rsiz

OPJ_RSIZ_CAPABILITIES opj_cparameters::cp_rsiz

DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Profile name.

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## cp_tdx

int opj_cparameters::cp_tdx

XTsiz.

Referenced by opj_j2k_get_imf_max_NL(), opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## cp_tdy

int opj_cparameters::cp_tdy

YTsiz.

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## cp_tx0

int opj_cparameters::cp_tx0

XTOsiz.

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## cp_ty0

int opj_cparameters::cp_ty0

YTOsiz.

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## csty

int opj_cparameters::csty

csty : coding style

Referenced by opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), and opj_j2k_setup_encoder().

## decod_format

int opj_cparameters::decod_format

input file format 0: PGX, 1: PxM, 2: BMP 3:TIF

Referenced by opj_set_default_encoder_parameters().

## image_offset_x0

int opj_cparameters::image_offset_x0

subimage encoding: origin image offset in x direction

Referenced by opj_j2k_set_cinema_parameters().

## image_offset_y0

int opj_cparameters::image_offset_y0

subimage encoding: origin image offset in y direction

Referenced by opj_j2k_set_cinema_parameters().

## index

char opj_cparameters::index[OPJ_PATH_LEN]

DEPRECATED.

Index generation is now handled with the opj_encode_with_info() function. Set to NULL

## index_on

int opj_cparameters::index_on

DEPRECATED.

Index generation is now handled with the opj_encode_with_info() function. Set to NULL

## infile

char opj_cparameters::infile[OPJ_PATH_LEN]

input file name

## irreversible

int opj_cparameters::irreversible

1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), and opj_set_MCT().

## jpip_on

OPJ_BOOL opj_cparameters::jpip_on

Enable JPIP indexing.

Referenced by opj_jp2_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_epc_on

OPJ_BOOL opj_cparameters::jpwl_epc_on

enables writing of EPC in MH, thus activating JPWL

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_hprot_MH

int opj_cparameters::jpwl_hprot_MH

error protection method for MH (0,1,16,32,37-128)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_hprot_TPH

int opj_cparameters::jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]

error protection methods for TPHs (0,1,16,32,37-128)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_hprot_TPH_tileno

int opj_cparameters::jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]

tile number of header protection specification (>=0)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_pprot

int opj_cparameters::jpwl_pprot[JPWL_MAX_NO_PACKSPECS]

error protection methods for packets (0,1,16,32,37-128)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_pprot_packno

int opj_cparameters::jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]

packet number of packet protection specification (>=0)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_pprot_tileno

int opj_cparameters::jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]

tile number of packet protection specification (>=0)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_sens_addr

int opj_cparameters::jpwl_sens_addr

sensitivity addressing size (0=auto/2/4 bytes)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_sens_MH

int opj_cparameters::jpwl_sens_MH

sensitivity method for MH (-1=no,0-7)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_sens_range

int opj_cparameters::jpwl_sens_range

sensitivity range (0-3)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_sens_size

int opj_cparameters::jpwl_sens_size

enables writing of ESD, (0=no/1/2 bytes)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_sens_TPH

int opj_cparameters::jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]

sensitivity methods for TPHs (-1=no,0-7)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## jpwl_sens_TPH_tileno

int opj_cparameters::jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]

tile number of sensitivity specification (>=0)

Referenced by opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## max_comp_size

int opj_cparameters::max_comp_size

Maximum size (in bytes) for each component.

If == 0, component size limitation is not considered

Referenced by opj_j2k_set_cinema_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## max_cs_size

int opj_cparameters::max_cs_size

Maximum size (in bytes) for the whole codestream.

If == 0, codestream size limitation is not considered If it does not comply with tcp_rates, max_cs_size prevails and a warning is issued.

Referenced by opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## mct_data

void* opj_cparameters::mct_data

Naive implementation of MCT restricted to a single reversible array based encoding without offset concerning all the components.

Referenced by opj_j2k_setup_encoder(), and opj_set_MCT().

## mode

int opj_cparameters::mode

mode switch (cblk_style)

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## numpocs

OPJ_UINT32 opj_cparameters::numpocs

number of progression order changes (POC), default to 0

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## numresolution

int opj_cparameters::numresolution

number of resolutions

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## outfile

char opj_cparameters::outfile[OPJ_PATH_LEN]

output file name

## POC

opj_poc_t opj_cparameters::POC[32]

progression order changes

Referenced by opj_j2k_set_cinema_parameters(), and opj_j2k_setup_encoder().

## prch_init

int opj_cparameters::prch_init[OPJ_J2K_MAXRLVLS]

initial precinct height

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), and opj_j2k_setup_encoder().

## prcw_init

int opj_cparameters::prcw_init[OPJ_J2K_MAXRLVLS]

initial precinct width

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), and opj_j2k_setup_encoder().

## prog_order

OPJ_PROG_ORDER opj_cparameters::prog_order

progression order (default OPJ_LRCP)

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## res_spec

int opj_cparameters::res_spec

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), and opj_j2k_setup_encoder().

## roi_compno

int opj_cparameters::roi_compno

region of interest: affected component in [0..3], -1 means no ROI

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## roi_shift

int opj_cparameters::roi_shift

region of interest: upshift value

Referenced by opj_j2k_setup_encoder().

## rsiz

OPJ_UINT16 opj_cparameters::rsiz

RSIZ value To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels values.

Referenced by opj_j2k_get_imf_max_NL(), opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), opj_set_default_encoder_parameters(), and opj_set_MCT().

## subsampling_dx

int opj_cparameters::subsampling_dx

subsampling value for dx

Referenced by opj_j2k_set_cinema_parameters(), and opj_set_default_encoder_parameters().

## subsampling_dy

int opj_cparameters::subsampling_dy

subsampling value for dy

Referenced by opj_j2k_set_cinema_parameters(), and opj_set_default_encoder_parameters().

## tcp_distoratio

float opj_cparameters::tcp_distoratio[100]

different psnr for successive layers.

Should be increasing. 0 can be used as last value to indicate the last layer is lossless.

Referenced by opj_j2k_setup_encoder().

## tcp_mct

char opj_cparameters::tcp_mct

MCT (multiple component transform).

Referenced by opj_j2k_setup_encoder(), and opj_set_MCT().

## tcp_numlayers

int opj_cparameters::tcp_numlayers

number of layers

Referenced by opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## tcp_rates

float opj_cparameters::tcp_rates[100]

rates of layers - might be subsequently limited by the max_cs_size field.

Should be decreasing. 1 can be used as last value to indicate the last layer is lossless.

Referenced by opj_j2k_set_cinema_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

## tile_size_on

OPJ_BOOL opj_cparameters::tile_size_on

size of tile: tile_size_on = false (not in argument) or = true (in argument)

Referenced by opj_j2k_get_imf_max_NL(), opj_j2k_is_imf_compliant(), opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), and opj_j2k_setup_encoder().

## tp_flag

char opj_cparameters::tp_flag

Flag for Tile part generation.

Referenced by opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), and opj_j2k_setup_encoder().

## tp_on

char opj_cparameters::tp_on

Tile part generation.

Referenced by opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_encoder(), and opj_set_default_encoder_parameters().

The documentation for this struct was generated from the following file:

- openjpeg.h