Grok
7.6.3
|
#include <T1.h>
Public Member Functions | |
T1 (bool isCompressor, uint32_t maxCblkW, uint32_t maxCblkH) | |
~T1 () | |
bool | decompress_cblk (cblk_dec *cblk, uint8_t orientation, uint32_t cblksty) |
void | code_block_enc_deallocate (cblk_enc *p_code_block) |
ENCODE ////////////////////////////////////////////////////. More... | |
bool | allocate_buffers (uint32_t w, uint32_t h) |
double | compress_cblk (cblk_enc *cblk, uint32_t max, uint8_t orientation, uint16_t compno, uint8_t level, uint8_t qmfbid, double stepsize, uint32_t cblksty, const double *mct_norms, uint16_t mct_numcomps, bool doRateControl) |
Public Attributes | |
mqcoder | coder |
MQC component. More... | |
int32_t * | data |
uint32_t | w |
uint32_t | h |
uint32_t | data_stride |
uint8_t * | cblkdatabuffer |
uint32_t | cblkdatabuffersize |
Private Member Functions | |
template<uint32_t w, uint32_t h, bool vsc> | |
void | dec_clnpass (int32_t bpno) |
void | dec_clnpass_step (grk_flag *flagsp, int32_t *datap, int32_t oneplushalf, uint32_t ciorig, uint32_t ci, uint32_t vsc) |
void | dec_clnpass (int32_t bpno, int32_t cblksty) |
void | dec_clnpass_check_segsym (int32_t cblksty) |
void | dec_sigpass_raw (int32_t bpno, int32_t cblksty) |
void | dec_refpass_raw (int32_t bpno) |
void | dec_sigpass_mqc (int32_t bpno, int32_t cblksty) |
void | dec_refpass_mqc (int32_t bpno) |
void | dec_refpass_step_raw (grk_flag *flagsp, int32_t *datap, int32_t poshalf, uint32_t ci) |
void | dec_refpass_step_mqc (mqcoder *mqc, grk_flag *flagsp, int32_t *datap, int32_t poshalf, uint32_t ci) |
void | dec_sigpass_step_raw (grk_flag *flagsp, int32_t *datap, int32_t oneplushalf, uint32_t vsc, uint32_t ci) |
void | dec_sigpass_step_mqc (grk_flag *flagsp, int32_t *datap, int32_t oneplushalf, uint32_t ci, uint32_t flags_stride, uint32_t vsc) |
void | enc_clnpass (int32_t bpno, int32_t *nmsedec, uint32_t cblksty) |
void | enc_sigpass (int32_t bpno, int32_t *nmsedec, uint8_t type, uint32_t cblksty) |
void | enc_refpass (int32_t bpno, int32_t *nmsedec, uint8_t type) |
int | enc_is_term_pass (cblk_enc *cblk, uint32_t cblksty, int32_t bpno, uint32_t passtype) |
bool | code_block_enc_allocate (cblk_enc *p_code_block) |
double | getnorm_53 (uint32_t level, uint8_t orientation) |
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT. More... | |
double | getnorm_97 (uint32_t level, uint8_t orientation) |
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT. More... | |
double | getnorm (uint32_t level, uint8_t orientation, bool reversible) |
double | getwmsedec (int32_t nmsedec, uint32_t compno, uint32_t level, uint8_t orientation, int32_t bpno, uint32_t qmfbid, double stepsize, const double *mct_norms, uint32_t mct_numcomps) |
Private Attributes | |
grk_flag * | flags |
Flags used by decompressor and compressor. More... | |
uint32_t | datasize |
uint32_t | flagssize |
bool | compressor |
grk::T1::T1 | ( | bool | isCompressor, |
uint32_t | maxCblkW, | ||
uint32_t | maxCblkH | ||
) |
References cblkdatabuffer, cblkdatabuffersize, coder, and grk::grk_malloc().
grk::T1::~T1 | ( | ) |
References cblkdatabuffer, data, flags, grk::grk_aligned_free(), and grk::grk_free().
bool grk::T1::allocate_buffers | ( | uint32_t | w, |
uint32_t | h | ||
) |
References grk::grk_aligned_free(), grk::grk_aligned_malloc(), grk::GRK_ERROR(), T1_PI_0, T1_PI_1, T1_PI_2, and T1_PI_3.
Referenced by decompress_cblk(), and grk::t1_part1::T1Part1::preCompress().
|
private |
References grk::grk_calloc(), and grk::cblk_enc::passes.
Referenced by compress_cblk().
void grk::T1::code_block_enc_deallocate | ( | cblk_enc * | code_block | ) |
ENCODE ////////////////////////////////////////////////////.
Deallocate the compressing data of the given precinct.
References grk::grk_free(), and grk::cblk_enc::passes.
Referenced by grk::t1_part1::T1Part1::compress().
double grk::T1::compress_cblk | ( | cblk_enc * | cblk, |
uint32_t | max, | ||
uint8_t | orientation, | ||
uint16_t | compno, | ||
uint8_t | level, | ||
uint8_t | qmfbid, | ||
double | stepsize, | ||
uint32_t | cblksty, | ||
const double * | mct_norms, | ||
uint16_t | mct_numcomps, | ||
bool | doRateControl | ||
) |
References code_block_enc_allocate(), coder, grk::cblk_enc::data, enc_clnpass(), enc_is_term_pass(), enc_refpass(), enc_sigpass(), getwmsedec(), GRK_CBLKSTY_LAZY, GRK_CBLKSTY_PTERM, GRK_CBLKSTY_RESET, GRK_CBLKSTY_SEGSYM, lut_ctxno_zc, grk::mqc_bypass_flush_enc(), grk::mqc_bypass_get_extra_bytes_enc(), grk::mqc_bypass_init_enc(), grk::mqc_erterm_enc(), grk::mqc_flush_enc(), grk::mqc_init_enc(), grk::mqc_numbytes_enc(), grk::mqc_resetstates(), grk::mqc_restart_init_enc(), grk::mqc_segmark_enc(), grk::cblk_enc::numbps, grk::cblk_enc::numPassesTotal, grk::cblk_enc::passes, grk::pass_enc::rate, T1_NMSEDEC_FRACBITS, T1_TYPE_MQ, T1_TYPE_RAW, and grk::pass_enc::term.
Referenced by grk::t1_part1::T1Part1::compress().
|
private |
References dec_clnpass_internal, h, and w.
Referenced by decompress_cblk().
|
private |
References dec_clnpass_check_segsym(), dec_clnpass_internal, GRK_CBLKSTY_VSC, h, and w.
|
private |
References coder, GRK_CBLKSTY_SEGSYM, grk::GRK_WARN(), mqc_decode, mqc_setcurctx, and T1_CTXNO_UNI.
Referenced by dec_clnpass().
|
private |
References coder, dec_clnpass_step_macro, and w.
|
private |
References dec_refpass_mqc_internal, h, and w.
Referenced by decompress_cblk().
|
private |
References data, dec_refpass_step_raw(), flags, h, and w.
Referenced by decompress_cblk().
|
inlineprivate |
References grk::mqcoder::a, grk::mqcoder::c, grk::mqcoder::ct, grk::mqcoder::curctx, and dec_refpass_step_mqc_macro.
|
inlineprivate |
References coder, mqc_raw_decode(), T1_MU_THIS, T1_PI_THIS, and T1_SIGMA_THIS.
Referenced by dec_refpass_raw().
|
private |
References dec_sigpass_mqc_internal, GRK_CBLKSTY_VSC, h, and w.
Referenced by decompress_cblk().
|
private |
References data, dec_sigpass_step_raw(), flags, GRK_CBLKSTY_VSC, h, and w.
Referenced by decompress_cblk().
|
inlineprivate |
References coder, and dec_sigpass_step_mqc_macro.
|
inlineprivate |
References coder, flags, mqc_raw_decode(), T1_PI_THIS, T1_SIGMA_NEIGHBOURS, T1_SIGMA_THIS, grk::update_flags(), and w.
Referenced by dec_sigpass_raw().
bool grk::T1::decompress_cblk | ( | cblk_dec * | cblk, |
uint8_t | orientation, | ||
uint32_t | cblksty | ||
) |
References allocate_buffers(), grk::seg_data_chunk::buf, coder, dec_clnpass(), dec_refpass_mqc(), dec_refpass_raw(), dec_sigpass_mqc(), dec_sigpass_raw(), GRK_CBLKSTY_LAZY, GRK_CBLKSTY_PTERM, GRK_CBLKSTY_RESET, grk::GRK_ERROR(), grk::GRK_WARN(), grk::k_max_bit_planes, grk::seg::len, lut_ctxno_zc, grk::mqc_finish_dec(), grk::mqc_init_dec(), grk::mqc_raw_init_dec(), grk::mqc_resetstates(), grk::cblk_dec::numbps, grk::seg::numpasses, grk::cblk_dec::numSegments, grk::cblk_dec::seg_buffers, grk::cblk_dec::segs, T1_TYPE_MQ, T1_TYPE_RAW, grk::cblk_dec::x0, grk::cblk_dec::x1, grk::cblk_dec::y0, and grk::cblk_dec::y1.
Referenced by grk::t1_part1::T1Part1::decompress().
|
private |
References coder, data, data_stride, DOWNLOAD_MQC_VARIABLES, flags, grk::getctxno_sc(), grk::getctxno_zc(), grk::getctxtno_sc_or_spb_index(), grk::getnmsedec_sig(), grk::getspb(), GRK_CBLKSTY_VSC, h, mqc_encode_macro, smr_abs, smr_sign, T1_CTXNO_AGG, T1_CTXNO_UNI, T1_NMSEDEC_FRACBITS, T1_PI_0, T1_PI_1, T1_PI_2, T1_PI_3, T1_PI_THIS, T1_SIGMA_10, T1_SIGMA_13, T1_SIGMA_4, T1_SIGMA_7, T1_SIGMA_THIS, grk::update_flags(), UPLOAD_MQC_VARIABLES, and w.
Referenced by compress_cblk().
|
private |
References GRK_CBLKSTY_LAZY, GRK_CBLKSTY_TERMALL, and grk::cblk_enc::numbps.
Referenced by compress_cblk().
|
private |
References coder, data, data_stride, DOWNLOAD_MQC_VARIABLES, enc_refpass_step_macro, flags, h, T1_NMSEDEC_FRACBITS, T1_PI_0, T1_PI_1, T1_PI_2, T1_PI_3, T1_SIGMA_10, T1_SIGMA_13, T1_SIGMA_4, T1_SIGMA_7, UPLOAD_MQC_VARIABLES, and w.
Referenced by compress_cblk().
|
private |
References coder, data, data_stride, DOWNLOAD_MQC_VARIABLES, enc_sigpass_step_macro, flags, GRK_CBLKSTY_VSC, h, T1_NMSEDEC_FRACBITS, UPLOAD_MQC_VARIABLES, and w.
Referenced by compress_cblk().
|
private |
|
private |
Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.
level | Level of the wavelet function |
orientation | Band of the wavelet function |
Referenced by getwmsedec().
|
private |
Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.
level | Level of the wavelet function |
orientation | Band of the wavelet function |
Referenced by getwmsedec().
|
private |
References getnorm_53(), and getnorm_97().
Referenced by compress_cblk().
uint8_t* grk::T1::cblkdatabuffer |
Referenced by grk::t1_part1::T1Part1::decompress(), T1(), and ~T1().
uint32_t grk::T1::cblkdatabuffersize |
Referenced by grk::t1_part1::T1Part1::decompress(), and T1().
mqcoder grk::T1::coder |
MQC component.
Referenced by compress_cblk(), dec_clnpass_check_segsym(), dec_clnpass_step(), dec_refpass_step_raw(), dec_sigpass_step_mqc(), dec_sigpass_step_raw(), decompress_cblk(), enc_clnpass(), enc_refpass(), enc_sigpass(), and T1().
|
private |
int32_t* grk::T1::data |
uint32_t grk::T1::data_stride |
Referenced by enc_clnpass(), enc_refpass(), enc_sigpass(), and grk::t1_part1::T1Part1::preCompress().
|
private |
|
private |
Flags used by decompressor and compressor.
Such that flags[1+0] is for state of col=0,row=0..3, flags[1+1] for col=1, row=0..3, flags[1+flags_stride] for col=0,row=4..7, ... This array avoids too much cache trashing when processing by 4 vertical samples as done in the various decoding steps.
Referenced by dec_refpass_raw(), dec_sigpass_raw(), dec_sigpass_step_raw(), enc_clnpass(), enc_refpass(), enc_sigpass(), and ~T1().
|
private |
uint32_t grk::T1::h |
Referenced by dec_clnpass(), dec_refpass_mqc(), dec_refpass_raw(), dec_sigpass_mqc(), dec_sigpass_raw(), enc_clnpass(), enc_refpass(), and enc_sigpass().
uint32_t grk::T1::w |