OpenJPEG 1.5.1
dwt.h File Reference

Implementation of a discrete wavelet transform (DWT) More...

Go to the source code of this file.

Functions

Exported functions
void dwt_encode (opj_tcd_tilecomp_t *tilec)
 Forward 5-3 wavelet tranform in 2-D. More...
 
void dwt_decode (opj_tcd_tilecomp_t *tilec, int numres)
 Inverse 5-3 wavelet tranform in 2-D. More...
 
int dwt_getgain (int orient)
 Get the gain of a subband for the reversible 5-3 DWT. More...
 
double dwt_getnorm (int level, int orient)
 Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT. More...
 
void dwt_encode_real (opj_tcd_tilecomp_t *tilec)
 Forward 9-7 wavelet transform in 2-D. More...
 
void dwt_decode_real (opj_tcd_tilecomp_t *tilec, int numres)
 Inverse 9-7 wavelet transform in 2-D. More...
 
int dwt_getgain_real (int orient)
 Get the gain of a subband for the irreversible 9-7 DWT. More...
 
double dwt_getnorm_real (int level, int orient)
 Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT. More...
 
void dwt_calc_explicit_stepsizes (opj_tccp_t *tccp, int prec)
 Explicit calculation of the Quantization Stepsizes. More...
 

Detailed Description

Implementation of a discrete wavelet transform (DWT)

The functions in DWT.C have for goal to realize forward and inverse discret wavelet transform with filter 5-3 (reversible) and filter 9-7 (irreversible). The functions in DWT.C are used by some function in TCD.C.

Function Documentation

◆ dwt_calc_explicit_stepsizes()

void dwt_calc_explicit_stepsizes ( opj_tccp_t tccp,
int  prec 
)

Explicit calculation of the Quantization Stepsizes.

Parameters
tccpTile-component coding parameters
precPrecint analyzed

References dwt_encode_stepsize(), dwt_norms_real, J2K_CCP_QNTSTY_NOQNT, opj_tccp::numresolutions, opj_tccp::qmfbid, opj_tccp::qntsty, and opj_tccp::stepsizes.

Referenced by j2k_setup_encoder().

◆ dwt_decode()

void dwt_decode ( opj_tcd_tilecomp_t tilec,
int  numres 
)

Inverse 5-3 wavelet tranform in 2-D.

Apply a reversible inverse DWT transform to a component of an image.

Parameters
tilecTile component information (current tile)
numresNumber of resolution levels to decode

References dwt_decode_1(), and dwt_decode_tile().

Referenced by tcd_decode_tile().

◆ dwt_decode_real()

void dwt_decode_real ( opj_tcd_tilecomp_t tilec,
int  numres 
)

Inverse 9-7 wavelet transform in 2-D.

Apply an irreversible inverse DWT transform to a component of an image.

Parameters
tilecTile component information (current tile)
numresNumber of resolution levels to decode

◆ dwt_encode()

void dwt_encode ( opj_tcd_tilecomp_t tilec)

Forward 5-3 wavelet tranform in 2-D.

Apply a reversible DWT transform to a component of an image.

Parameters
tilecTile component information (current tile)

References opj_tcd_tilecomp::data, dwt_deinterleave_h(), dwt_deinterleave_v(), dwt_encode_1(), opj_tcd_tilecomp::numresolutions, opj_free, opj_malloc, opj_tcd_tilecomp::resolutions, opj_tcd_resolution::x0, opj_tcd_tilecomp::x0, opj_tcd_resolution::x1, opj_tcd_tilecomp::x1, opj_tcd_resolution::y0, and opj_tcd_resolution::y1.

Referenced by tcd_encode_tile().

◆ dwt_encode_real()

void dwt_encode_real ( opj_tcd_tilecomp_t tilec)

Forward 9-7 wavelet transform in 2-D.

Apply an irreversible DWT transform to a component of an image.

Parameters
tilecTile component information (current tile)

References opj_tcd_tilecomp::data, dwt_deinterleave_h(), dwt_deinterleave_v(), dwt_encode_1_real(), opj_tcd_tilecomp::numresolutions, opj_free, opj_malloc, opj_tcd_tilecomp::resolutions, opj_tcd_resolution::x0, opj_tcd_tilecomp::x0, opj_tcd_resolution::x1, opj_tcd_tilecomp::x1, opj_tcd_resolution::y0, and opj_tcd_resolution::y1.

Referenced by tcd_encode_tile().

◆ dwt_getgain()

int dwt_getgain ( int  orient)

Get the gain of a subband for the reversible 5-3 DWT.

Parameters
orientNumber that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
Returns
Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise

Referenced by tcd_init_encode(), tcd_malloc_decode_tile(), and tcd_malloc_encode().

◆ dwt_getgain_real()

int dwt_getgain_real ( int  orient)

Get the gain of a subband for the irreversible 9-7 DWT.

Parameters
orientNumber that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
Returns
Returns the gain of the 9-7 wavelet transform

Referenced by tcd_init_encode(), tcd_malloc_decode_tile(), and tcd_malloc_encode().

◆ dwt_getnorm()

double dwt_getnorm ( int  level,
int  orient 
)

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
orientBand of the wavelet function
Returns
Returns the norm of the wavelet function

References dwt_norms.

Referenced by t1_getwmsedec().

◆ dwt_getnorm_real()

double dwt_getnorm_real ( int  level,
int  orient 
)

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
orientBand of the wavelet function
Returns
Returns the norm of the 9-7 wavelet

References dwt_norms_real.

Referenced by t1_getwmsedec().