Grok 13.0.0
grk::mct Class Reference

#include <mct.h>

Public Member Functions

 mct (Tile *tile, GrkImage *image, TileCodingParams *tcp, StripCache *stripCache)
 
void compress_rev (FlowComponent *flow)
 Apply a reversible multi-component transform to an image.
 
void decompress_rev (FlowComponent *flow)
 Apply a reversible multi-component inverse transform to an image.
 
void compress_irrev (FlowComponent *flow)
 Apply an irreversible multi-component transform to an image.
 
void decompress_irrev (FlowComponent *flow)
 Apply an irreversible multi-component inverse transform to an image.
 
void decompress_dc_shift_rev (FlowComponent *flow, uint16_t compno)
 Apply a reversible inverse dc shift to an image.
 
void decompress_dc_shift_irrev (FlowComponent *flow, uint16_t compno)
 Apply an irreversible inverse dc shift to an image.
 

Static Public Member Functions

static const double * get_norms_rev (void)
 Get wavelet norms for reversible transform.
 
static const double * get_norms_irrev (void)
 Get wavelet norms for irreversible transform.
 
static bool compress_custom (uint8_t *p_coding_data, uint64_t n, uint8_t **p_data, uint16_t numComps, uint32_t is_signed)
 Custom MCT transform.
 
static bool decompress_custom (uint8_t *pDecodingData, uint64_t n, uint8_t **pData, uint16_t pNbComp, uint32_t isSigned)
 Custom MCT decode.
 
static void calculate_norms (double *pNorms, uint16_t nb_comps, float *pMatrix)
 Calculate norm of MCT transform.
 

Private Member Functions

void genShift (uint16_t compno, int32_t sign, std::vector< ShiftInfo > &shiftInfo)
 
void genShift (int32_t sign, std::vector< ShiftInfo > &shiftInfo)
 

Private Attributes

Tiletile_
 
GrkImageimage_
 
TileCodingParamstcp_
 
StripCachestripCache_
 

Constructor & Destructor Documentation

◆ mct()

grk::mct::mct ( Tile * tile,
GrkImage * image,
TileCodingParams * tcp,
StripCache * stripCache )

Member Function Documentation

◆ calculate_norms()

void grk::mct::calculate_norms ( double * pNorms,
uint16_t nb_comps,
float * pMatrix )
static

Calculate norm of MCT transform.

Parameters
pNormsMCT data
nb_compsnumber of components
pMatrixcomponents

Referenced by grk::CodeStreamCompress::init().

◆ compress_custom()

bool grk::mct::compress_custom ( uint8_t * p_coding_data,
uint64_t n,
uint8_t ** p_data,
uint16_t numComps,
uint32_t is_signed )
static

Custom MCT transform.

Parameters
p_coding_dataMCT data
nsize of components
p_datacomponents
numCompsnb of components (i.e. size of p_data)
is_signedindicates if the data is signed
Returns
false if function encounter a problem, true otherwise

References grk::fix_mul(), grk::grk_free(), and grk::grk_malloc().

Referenced by grk::TileProcessor::mct_encode().

◆ compress_irrev()

void grk::mct::compress_irrev ( FlowComponent * flow)

Apply an irreversible multi-component transform to an image.

References genShift(), HWY_DYNAMIC_DISPATCH, grk::ScheduleInfo::shiftInfo, grk::singleTileRowsPerStrip, and tile_.

Referenced by grk::TileProcessor::mct_encode().

◆ compress_rev()

void grk::mct::compress_rev ( FlowComponent * flow)

Apply a reversible multi-component transform to an image.

References genShift(), HWY_DYNAMIC_DISPATCH, grk::ScheduleInfo::shiftInfo, grk::singleTileRowsPerStrip, and tile_.

Referenced by grk::TileProcessor::mct_encode().

◆ decompress_custom()

bool grk::mct::decompress_custom ( uint8_t * pDecodingData,
uint64_t n,
uint8_t ** pData,
uint16_t pNbComp,
uint32_t isSigned )
static

Custom MCT decode.

Parameters
pDecodingDataMCT data
nsize of components
pDatacomponents
pNbCompnb of components (i.e. size of p_data)
isSignedtells if the data is signed
Returns
false if function encounter a problem, true otherwise

Referenced by grk::TileProcessor::mctDecompress().

◆ decompress_dc_shift_irrev()

void grk::mct::decompress_dc_shift_irrev ( FlowComponent * flow,
uint16_t compno )

◆ decompress_dc_shift_rev()

void grk::mct::decompress_dc_shift_rev ( FlowComponent * flow,
uint16_t compno )

◆ decompress_irrev()

void grk::mct::decompress_irrev ( FlowComponent * flow)

Apply an irreversible multi-component inverse transform to an image.

inverse irreversible MCT (with dc shift) (vector routines are disabled)

References hwy::DisableTargets(), genShift(), HWY_DYNAMIC_DISPATCH, HWY_SCALAR, image_, _grk_image::rows_per_task, grk::ScheduleInfo::shiftInfo, stripCache_, and tile_.

Referenced by grk::TileProcessor::mctDecompress().

◆ decompress_rev()

void grk::mct::decompress_rev ( FlowComponent * flow)

Apply a reversible multi-component inverse transform to an image.

References genShift(), HWY_DYNAMIC_DISPATCH, image_, _grk_image::rows_per_task, grk::ScheduleInfo::shiftInfo, stripCache_, and tile_.

Referenced by grk::TileProcessor::mctDecompress().

◆ genShift() [1/2]

void grk::mct::genShift ( int32_t sign,
std::vector< ShiftInfo > & shiftInfo )
private

References genShift().

◆ genShift() [2/2]

◆ get_norms_irrev()

const double * grk::mct::get_norms_irrev ( void )
static

Get wavelet norms for irreversible transform.

References grk::mct_norms_irrev.

Referenced by grk::TileProcessor::t1_encode().

◆ get_norms_rev()

const double * grk::mct::get_norms_rev ( void )
static

Get wavelet norms for reversible transform.

References grk::mct_norms_rev.

Referenced by grk::TileProcessor::t1_encode().

Member Data Documentation

◆ image_

◆ stripCache_

◆ tcp_

TileCodingParams* grk::mct::tcp_
private

Referenced by genShift().

◆ tile_


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