Grok 12.0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
grk::T1 Struct Reference

#include <T1.h>

Public Member Functions

 T1 (bool isCompressor, uint32_t maxCblkW, uint32_t maxCblkH)
 
 ~T1 ()
 
bool decompress_cblk (DecompressCodeblock *cblk, uint8_t *compressedData, uint8_t orientation, uint32_t cblksty)
 
void code_block_enc_deallocate (cblk_enc *p_code_block)
 ENCODE ////////////////////////////////////////////////////.
 
bool alloc (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)
 
int32_tgetUncompressedData (void)
 
void attachUncompressedData (int32_t *data, uint32_t w, uint32_t h)
 
void allocCompressedData (size_t len)
 
uint8_tgetCompressedDataBuffer (void)
 

Static Public Member Functions

static double getnorm (uint32_t level, uint8_t orientation, bool reversible)
 

Public Attributes

mqcoder coder
 

Private Member Functions

bool allocUncompressedData (size_t len)
 
void deallocUncompressedData (void)
 
template<uint32_t w, uint32_t h, bool vsc>
void dec_clnpass (int32_t bpno)
 
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_sigpass_step_raw (grk_flag *flagsp, int32_t *datap, int32_t oneplushalf, uint32_t vsc, uint32_t ci)
 
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)
 
void 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.
 
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.
 
double getwmsedec (int32_t nmsedec, uint16_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

int32_tuncompressedData
 
size_t uncompressedDataLen
 
bool ownsUncompressedData
 
uint32_t w
 
uint32_t h
 
uint32_t uncompressedDataStride
 
uint8_tcompressedData
 
size_t compressedDataLen
 
grk_flagflags
 Flags used by decompressor and compressor.
 
uint32_t flagssize
 
bool compressor
 

Constructor & Destructor Documentation

◆ T1()

grk::T1::T1 ( bool isCompressor,
uint32_t maxCblkW,
uint32_t maxCblkH )

◆ ~T1()

grk::T1::~T1 ( )

Member Function Documentation

◆ alloc()

bool grk::T1::alloc ( uint32_t w,
uint32_t h )

◆ allocCompressedData()

void grk::T1::allocCompressedData ( size_t len)

◆ allocUncompressedData()

bool grk::T1::allocUncompressedData ( size_t len)
private

◆ attachUncompressedData()

void grk::T1::attachUncompressedData ( int32_t * data,
uint32_t w,
uint32_t h )

◆ code_block_enc_allocate()

void grk::T1::code_block_enc_allocate ( cblk_enc * p_code_block)
private

References grk::grk_read().

Referenced by compress_cblk().

◆ code_block_enc_deallocate()

void grk::T1::code_block_enc_deallocate ( cblk_enc * code_block)

ENCODE ////////////////////////////////////////////////////.

Deallocate the compressing data of the given precinct.

References grk::grk_read().

Referenced by grk::t1_part1::T1Part1::compress().

◆ compress_cblk()

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 )

◆ deallocUncompressedData()

void grk::T1::deallocUncompressedData ( void )
private

◆ dec_clnpass() [1/2]

template<uint32_t w, uint32_t h, bool vsc>
void grk::T1::dec_clnpass ( int32_t bpno)
private

References dec_clnpass_internal, grk::grk_read(), h, and w.

Referenced by decompress_cblk().

◆ dec_clnpass() [2/2]

void grk::T1::dec_clnpass ( int32_t bpno,
int32_t cblksty )
private

◆ dec_clnpass_check_segsym()

void grk::T1::dec_clnpass_check_segsym ( int32_t cblksty)
private

◆ dec_refpass_mqc()

void grk::T1::dec_refpass_mqc ( int32_t bpno)
private

References dec_refpass_mqc_internal, grk::grk_read(), h, and w.

Referenced by decompress_cblk().

◆ dec_refpass_raw()

void grk::T1::dec_refpass_raw ( int32_t bpno)
private

◆ dec_refpass_step_raw()

void grk::T1::dec_refpass_step_raw ( grk_flag * flagsp,
int32_t * datap,
int32_t poshalf,
uint32_t ci )
inlineprivate

◆ dec_sigpass_mqc()

void grk::T1::dec_sigpass_mqc ( int32_t bpno,
int32_t cblksty )
private

◆ dec_sigpass_raw()

void grk::T1::dec_sigpass_raw ( int32_t bpno,
int32_t cblksty )
private

◆ dec_sigpass_step_raw()

void grk::T1::dec_sigpass_step_raw ( grk_flag * flagsp,
int32_t * datap,
int32_t oneplushalf,
uint32_t vsc,
uint32_t ci )
inlineprivate

◆ decompress_cblk()

bool grk::T1::decompress_cblk ( DecompressCodeblock * cblk,
uint8_t * compressedData,
uint8_t orientation,
uint32_t cblksty )

◆ enc_clnpass()

void grk::T1::enc_clnpass ( int32_t bpno,
int32_t * nmsedec,
uint32_t cblksty )
private

◆ enc_is_term_pass()

int grk::T1::enc_is_term_pass ( cblk_enc * cblk,
uint32_t cblksty,
int32_t bpno,
uint32_t passtype )
private

◆ enc_refpass()

void grk::T1::enc_refpass ( int32_t bpno,
int32_t * nmsedec,
uint8_t type )
private

◆ enc_sigpass()

void grk::T1::enc_sigpass ( int32_t bpno,
int32_t * nmsedec,
uint8_t type,
uint32_t cblksty )
private

◆ getCompressedDataBuffer()

uint8_t * grk::T1::getCompressedDataBuffer ( void )

◆ getnorm()

double grk::T1::getnorm ( uint32_t level,
uint8_t orientation,
bool reversible )
static

◆ getnorm_53()

double grk::T1::getnorm_53 ( uint32_t level,
uint8_t orientation )
private

Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT.

Parameters
levelLevel of the wavelet function
orientationBand of the wavelet function
Returns
the norm of the wavelet function

References getnorm().

Referenced by getwmsedec().

◆ getnorm_97()

double grk::T1::getnorm_97 ( uint32_t level,
uint8_t orientation )
private

Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT.

Parameters
levelLevel of the wavelet function
orientationBand of the wavelet function
Returns
the norm of the 9-7 wavelet

References getnorm().

Referenced by getwmsedec().

◆ getUncompressedData()

int32_t * grk::T1::getUncompressedData ( void )

◆ getwmsedec()

double grk::T1::getwmsedec ( int32_t nmsedec,
uint16_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

References getnorm_53(), getnorm_97(), and grk::grk_read().

Referenced by compress_cblk().

Member Data Documentation

◆ coder

mqcoder grk::T1::coder

◆ compressedData

uint8_t* grk::T1::compressedData
private

◆ compressedDataLen

size_t grk::T1::compressedDataLen
private

Referenced by allocCompressedData().

◆ compressor

bool grk::T1::compressor
private

Referenced by alloc().

◆ flags

grk_flag* grk::T1::flags
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 alloc(), dec_refpass_raw(), dec_sigpass_raw(), enc_clnpass(), enc_refpass(), enc_sigpass(), and ~T1().

◆ flagssize

uint32_t grk::T1::flagssize
private

Referenced by alloc().

◆ h

uint32_t grk::T1::h
private

◆ ownsUncompressedData

bool grk::T1::ownsUncompressedData
private

◆ uncompressedData

int32_t* grk::T1::uncompressedData
private

◆ uncompressedDataLen

size_t grk::T1::uncompressedDataLen
private

Referenced by allocUncompressedData().

◆ uncompressedDataStride

uint32_t grk::T1::uncompressedDataStride
private

◆ w

uint32_t grk::T1::w
private

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