SAMPLER Class Reference

SAMPLER class. More...

#include <sampler.hpp>


Static Public Member Functions

static void set_take_screenshot (int val)
 Set flag that indicates if computed data is to be written to file or not.
static void init_file_names (void)
 Allocate enough memory for the filenames of the files that are written to disc [see set_take_screenshot(int val)].
static void free_file_name (void)
 Free the allocated memory for the filenames again.
static void set_file_name (char *fname)
 Set the filename.
static void set_file_names (char *fname_png_in, char *fname_pzd_in)
 Set the filenames.
static void compress_residue (imgdata_t *img)
 Compress residual signal.
static void upsample (uchar_t *src, uchar_t **dst, int img_w, int img_h, int pitch, int bytes_pp)
 Perform upsampling.
static __forceinline void upsample_rt (imgdata_t *src_img, imgdata_t *dst_img, int src_sx, int src_sy)
 Perform upsampling.
static __forceinline void upsample_rt (imgdata_t *src_img, imgdata_t *dst_img)
 Perform upsampling.
static void downsample (uchar_t *src, uchar_t **dst, int img_w, int img_h, int pitch, int bytes_pp)
 Perform downsampling.
static int diff_img_memsave (imgdata_t *img_src1, imgdata_t *img_src2, imgdata_t *img_dst)
 Calculate difference image.
static uchar_t * diff_img (uchar_t *dat1, uchar_t *dat2, int img_w, int img_h, int pitch, int bytes_pp)
 Calculate difference image.
static uchar_t * blend_img_residual (uchar_t *residual_diff_dat1, uchar_t *dat2, int img_w, int img_h, int pitch, int bytes_pp)
 Blend upsampled image with the residual signal. The residual signal comes from the EZW-compressed difference-images. The input images and the output image must have equal dimensions.
static __forceinline void blend_img_residual_rt2 (imgdata_t *diff_img, imgdata_t *upsamp_img, imgdata_t *blend_img)
 Blend upsampled image with the residual signal. The residual signal comes from the EZW-compressed difference-images. The input images and the output image must have equal dimensions.
static __forceinline void cut_upsample (imgdata_t *diff_img, imgdata_t *upsamp_img, imgdata_t *blend_img)
 Only perform upsampling. The input images and the output image must have equal dimensions.


Detailed Description

SAMPLER class.


Member Function Documentation

static uchar_t* SAMPLER::blend_img_residual ( uchar_t *  residual_diff_dat1,
uchar_t *  dat2,
int  img_w,
int  img_h,
int  pitch,
int  bytes_pp 
) [inline, static]

Blend upsampled image with the residual signal. The residual signal comes from the EZW-compressed difference-images. The input images and the output image must have equal dimensions.

Parameters:
residual_diff_dat1 The residual data.
dat2 The upsampled data.
img_w The width of the images.
img_h The height of the images.
pitch The pitch of the images.
bytes_pp The bytes per pixel of the images.
Returns:
Returns the resulting image or NULL if an error occurs.

static __forceinline void SAMPLER::blend_img_residual_rt2 ( imgdata_t *  diff_img,
imgdata_t *  upsamp_img,
imgdata_t *  blend_img 
) [inline, static]

Blend upsampled image with the residual signal. The residual signal comes from the EZW-compressed difference-images. The input images and the output image must have equal dimensions.

Parameters:
diff_img The residual data.
upsamp_img The upsampled data.
blend_img The destination to write the result to.

static void SAMPLER::compress_residue ( imgdata_t *  img  )  [inline, static]

Compress residual signal.

Parameters:
img The image to process.

static __forceinline void SAMPLER::cut_upsample ( imgdata_t *  diff_img,
imgdata_t *  upsamp_img,
imgdata_t *  blend_img 
) [inline, static]

Only perform upsampling. The input images and the output image must have equal dimensions.

Parameters:
diff_img The residual data (not used).
upsamp_img The upsampled data.
blend_img The destination to write the result to.

static uchar_t* SAMPLER::diff_img ( uchar_t *  dat1,
uchar_t *  dat2,
int  img_w,
int  img_h,
int  pitch,
int  bytes_pp 
) [inline, static]

Calculate difference image.

The two images for the difference calculation are assumed to be of equal dimensions.

Parameters:
dat1 The first image for the difference-calculation.
dat2 The second image for the difference-calculation.
img_w The width of the source-images.
img_h The height of the source-images.
pitch The pitch of the source-images.
bytes_pp The bytes per pixel of the source-images.
Returns:
Returns a pointer to the difference image or NULL if an error occurs.

static int SAMPLER::diff_img_memsave ( imgdata_t *  img_src1,
imgdata_t *  img_src2,
imgdata_t *  img_dst 
) [inline, static]

Calculate difference image.

The two images for the difference calculation are assumed to be of equal dimensions.

Parameters:
img_src1 The first image for the difference-calculation.
img_src2 The second image for the difference-calculation.
img_dst The destination image for the difference-calculation. It is assumed, that the memory is prealloced before calling this method.
Returns:
Returns 0 on success and -1 if an error occurs.

static void SAMPLER::downsample ( uchar_t *  src,
uchar_t **  dst,
int  img_w,
int  img_h,
int  pitch,
int  bytes_pp 
) [inline, static]

Perform downsampling.

Use custom 5x5 filter.

Parameters:
src The source-data.
dst The destination for the downsampled image.
img_w The width of the source-image.
img_h The height of the source-image.
pitch The pitch of the source-image.
bytes_pp The bytes per pixel of the source-image.

static void SAMPLER::set_file_name ( char *  fname  )  [inline, static]

Set the filename.

Parameters:
fname The filename.

static void SAMPLER::set_file_names ( char *  fname_png_in,
char *  fname_pzd_in 
) [inline, static]

Set the filenames.

Parameters:
fname_png_in The filename for a PNG file.
fname_pzd_in The filename for a PZD/PRD file (newly designed fileformats).

static void SAMPLER::set_take_screenshot ( int  val  )  [inline, static]

Set flag that indicates if computed data is to be written to file or not.

Parameters:
val The flag.

static void SAMPLER::upsample ( uchar_t *  src,
uchar_t **  dst,
int  img_w,
int  img_h,
int  pitch,
int  bytes_pp 
) [inline, static]

Perform upsampling.

Use Kobbelt's interpolatory subdivision filter with weights (-1/16, 9/16, 9/16, -1/16)

Parameters:
src The source-data.
dst The destination for the upsampled image.
img_w The width of the source-image.
img_h The height of the source-image.
pitch The pitch of the source-image.
bytes_pp The bytes per pixel of the source-image.

static __forceinline void SAMPLER::upsample_rt ( imgdata_t *  src_img,
imgdata_t *  dst_img 
) [inline, static]

Perform upsampling.

Use Kobbelt's interpolatory subdivision filter with weights (-1/16, 9/16, 9/16, -1/16). The target img is always 4 bytes per pixel

Parameters:
src_img The source-data.
dst_img The destination for the upsampled image.

static __forceinline void SAMPLER::upsample_rt ( imgdata_t *  src_img,
imgdata_t *  dst_img,
int  src_sx,
int  src_sy 
) [inline, static]

Perform upsampling.

Use Kobbelt's interpolatory subdivision filter with weights (-1/16, 9/16, 9/16, -1/16). The target img is always 4 bytes per pixel

Parameters:
src_img The source-data.
dst_img The destination for the upsampled image.
src_sx X offset.
src_sy Y offset.


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