CRESIDUE Class Reference

Compression-manger class. More...

#include <cresidue.hpp>


Static Public Member Functions

static __forceinline void split_RGB_move (uchar_t *data, imgdata_t *img)
 RGB -> YCbCr colorspace transform (JPEG 2000 standard -> component transform).
static void merge_RGB (float *img_dataR, float *img_dataG, float *img_dataB, imgdata_t *img)
 Reconstruct an RGB image from 3 separate channels.
static void fwd_transform_channel (float *img_data, int pitch, int dwt_levels, int ezw_passes, int ch_num, uchar_t *ext_compr_data_dom, uchar_t *ext_compr_data_sub)
 Do forward wavelet transform.
static __forceinline void inv_transform_channel (float *img_data, int pitch, int dwt_levels, int ezw_passes, int ch_num, uchar_t *ext_compr_data_dom, uchar_t *ext_compr_data_sub)
 Do inverse wavelet transform.
static int load_ezw_files (char **nameRGB, ezw3_t *data_from_3_channels, int *file_lenRGB)
 Load EZW-compressed files.
static int build_startaddr_idx_struct (ezw3_t *meta3ch, int *file_lenRGB)
 Build index-structure for accessing each compressed tile.
static __forceinline void decompress_tile_at (int tile_addr, ezw3_t *pyr, imgdata_t *dst_decompr_tile_RGB)
 Perform random access decompression.


Detailed Description

Compression-manger class.

Calculates and compresses the residual signal. Once the successively downsampled images are precalculated the higher detail images are predicted from the coarsest resolution and the difference-image to the previously computed downsampled image is EZW-compressed


Member Function Documentation

static int CRESIDUE::build_startaddr_idx_struct ( ezw3_t *  meta3ch,
int *  file_lenRGB 
) [inline, static]

Build index-structure for accessing each compressed tile.

Parameters:
meta3ch Datastructure that describes the data for which the index-struct is to be built.
file_lenRGB Total length of each compressed channel.
Returns:
Returns -1 upon any error, else 0.

static __forceinline void CRESIDUE::decompress_tile_at ( int  tile_addr,
ezw3_t *  pyr,
imgdata_t *  dst_decompr_tile_RGB 
) [inline, static]

Perform random access decompression.

Parameters:
tile_addr The tile which is to be decompressed.
pyr Datastructure that describes all tiles in the current image-pyramid level.
dst_decompr_tile_RGB Decompressed data in RGB-format.

static void CRESIDUE::fwd_transform_channel ( float *  img_data,
int  pitch,
int  dwt_levels,
int  ezw_passes,
int  ch_num,
uchar_t *  ext_compr_data_dom,
uchar_t *  ext_compr_data_sub 
) [inline, static]

Do forward wavelet transform.

Parameters:
img_data Data to transform.
pitch Pitch of img_data.
dwt_levels Determines, how many stages/levels the wavelet-filter has.
ezw_passes Determines, how often the EZW algorithm is to be applied.
ch_num Identifier for the current channel (R, G or B).
ext_compr_data_dom Destination for the symbols of the EZW dominant pass.
ext_compr_data_sub Destination for the symbols of the EZW subordinate pass.

static __forceinline void CRESIDUE::inv_transform_channel ( float *  img_data,
int  pitch,
int  dwt_levels,
int  ezw_passes,
int  ch_num,
uchar_t *  ext_compr_data_dom,
uchar_t *  ext_compr_data_sub 
) [inline, static]

Do inverse wavelet transform.

Parameters:
img_data Destination for inverse-transformed data.
pitch Pitch of img_data.
dwt_levels Determines, how many stages/levels the wavelet-filter has.
ezw_passes Determines, how often the EZW algorithm is to be applied.
ch_num Identifier for the current channel (R, G or B).
ext_compr_data_dom Source of the symbols for the EZW dominant pass.
ext_compr_data_sub Source of the symbols for the EZW subordinate pass.

static int CRESIDUE::load_ezw_files ( char **  nameRGB,
ezw3_t *  data_from_3_channels,
int *  file_lenRGB 
) [inline, static]

Load EZW-compressed files.

Parameters:
nameRGB Stores 3 pointers to the compressed datafiles for the R-, G- and B-channel.
data_from_3_channels Destination for the read data.
file_lenRGB Stores the 3 file lengths.
Returns:
Returns -1 if any of the 3 EZW-compressed files couldn't be loaded, else 0.

static void CRESIDUE::merge_RGB ( float *  img_dataR,
float *  img_dataG,
float *  img_dataB,
imgdata_t *  img 
) [inline, static]

Reconstruct an RGB image from 3 separate channels.

Parameters:
img_dataR Data for the red channel.
img_dataG Data for the green channel.
img_dataB Data for the blue channel.
img Destination for the reconstructed image.

static __forceinline void CRESIDUE::split_RGB_move ( uchar_t *  data,
imgdata_t *  img 
) [inline, static]

RGB -> YCbCr colorspace transform (JPEG 2000 standard -> component transform).

Move channels to diff_tile[R|G|B]. This is necessary, because the wavelet-transform is carried out individually on each channel. Use "imgdata_t"-struct only for addressing issues. The colorspace transform compacts the energy of the image in (mainly) one channel, so that the overall compressionrate is improved.

Parameters:
data Pointer to RGB data.
img Information about the image (width, height, pitch, bytes per pixel, ...).


The documentation for this class was generated from the following file:
Generated on Tue Jun 26 04:22:56 2007 for YAZAPA - yet another zooming and panning application by  doxygen 1.4.7