src/wavelet2D.c File Reference

#include <it/types.h>
#include <it/wavelet.h>
#include <it/wavelet2D.h>
#include <it/io.h>

Go to the source code of this file.

Defines

#define reset_pointers()
#define increment_pointers()
#define adjust_pointers(odd)
#define hlifting(dest, source, constant, alt_source_pre, alt_source, alt_source_post, w, h, odd)
#define hlifting(dest, source, constant, alt_source_pre, alt_source, alt_source_post, w, h, odd)
#define vlifting(dest, source, constant, alt_source_pre, alt_source, alt_source_post, line, w, h)
#define scale(dest, scale, count)
#define shift_up(x, l)   ((x + ~(-1 << l)) >> l)
#define round_up(x, l)   (shift_up(x, l) << l)

Functions

static int __wavelet2D_split (it_wavelet2D_t *wavelet)
static int __wavelet2D_merge (it_wavelet2D_t *wavelet)
static int __wavelet_flatten (it_wavelet2D_t *it_this, mat image)
static int __wavelet_unflatten (it_wavelet2D_t *it_this, mat image)
static Mat __it_wavelet2D_transform (it_transform2D_t *transform, Mat __image)
static Mat __it_wavelet2D_itransform (it_transform2D_t *transform, Mat __flat)
static int __it_wavelet2D_copy (it_wavelet2D_t *it_this, it_wavelet2D_t *source)
static void __wavelet2D_get_output_size (it_transform2D_t *transform, idx_t *width, idx_t *height)
static void __wavelet2D_set_size (it_transform2D_t *transform, idx_t width, idx_t height)
static void __wavelet2D_get_size (it_transform2D_t *transform, idx_t *width, idx_t *height)
static void __wavelet2D_destructor (it_object_t *it_this)
 it_instanciate (it_wavelet2D_t)
matit_wavelet2D_split (mat wav, int nb_levels)
mat it_wavelet2D_merge (mat *subbands, int nb_levels)
mat it_dwt2D (mat m, it_wavelet_lifting_t const *lifting, int levels)
mat it_idwt2D (mat t, it_wavelet_lifting_t const *lifting, int levels)


Define Documentation

#define adjust_pointers ( odd   ) 

Value:

do {            \
  pixels+=odd;          \
  if(odd == 1) low++;       \
  if(odd == -1) high--;       \
} while(0)

Definition at line 110 of file wavelet2D.c.

#define hlifting ( dest,
source,
constant,
alt_source_pre,
alt_source,
alt_source_post,
w,
h,
odd   ) 

Value:

do {                  \
  reset_pointers();             \
  for(y = 0; y < (h); y++) {            \
    (dest) = (source) + (constant) * (alt_source_pre);      \
    increment_pointers();           \
                  \
    for(x = 1; x < (w)-1; x++) {          \
      (dest) = (source) + (constant) * (alt_source);      \
      increment_pointers();           \
    }                 \
                      \
    (dest) = (source) + (constant) * (alt_source_post);     \
    increment_pointers();           \
    adjust_pointers(odd);           \
  }                 \
} while(0)

Definition at line 136 of file wavelet2D.c.

#define hlifting ( dest,
source,
constant,
alt_source_pre,
alt_source,
alt_source_post,
w,
h,
odd   ) 

Value:

do {                  \
  reset_pointers();             \
  for(y = 0; y < (h); y++) {            \
    (dest) = (source) + (constant) * (alt_source_pre);      \
    increment_pointers();           \
                  \
    for(x = 1; x < (w)-1; x++) {          \
      (dest) = (source) + (constant) * (alt_source);      \
      increment_pointers();           \
    }                 \
                      \
    (dest) = (source) + (constant) * (alt_source_post);     \
    increment_pointers();           \
    adjust_pointers(odd);           \
  }                 \
} while(0)

Definition at line 136 of file wavelet2D.c.

Referenced by __wavelet2D_merge(), and __wavelet2D_split().

 
#define increment_pointers (  ) 

Value:

do {            \
  pixels+=2;          \
  low++;          \
  high++;         \
  high_low++;         \
  high_high++;          \
  low_high++;         \
  low_low++;          \
} while(0)

Definition at line 99 of file wavelet2D.c.

 
#define reset_pointers (  ) 

Value:

do {            \
  pixels = buffer + page;     \
  low = buffer;         \
  high = buffer + (page >> 1);      \
  low_low =   buffer + (page >> 1) + 0 * (page >> 2); \
  low_high =  buffer + (page >> 1) + 1 * (page >> 2); \
  high_low =  buffer + (page >> 1) + 2 * (page >> 2); \
  high_high = buffer + (page >> 1) + 3 * (page >> 2); \
} while(0)

Definition at line 88 of file wavelet2D.c.

Referenced by __wavelet2D_split().

#define round_up ( x,
 )     (shift_up(x, l) << l)

#define scale ( dest,
scale,
count   ) 

Value:

do {            \
  reset_pointers();       \
  for(x = 0; x < (count); x++) {    \
    (dest)[0] *= (scale);     \
    increment_pointers();     \
  }           \
} while(0)

Definition at line 175 of file wavelet2D.c.

Referenced by __wavelet2D_merge(), __wavelet2D_split(), __wavelet_merge(), __wavelet_split(), mat_hessenberg(), mat_svd(), and mat_tridiag().

#define shift_up ( x,
 )     ((x + ~(-1 << l)) >> l)

Definition at line 184 of file wavelet2D.c.

#define vlifting ( dest,
source,
constant,
alt_source_pre,
alt_source,
alt_source_post,
line,
w,
 ) 

Value:

do {                  \
  reset_pointers();             \
  for(x = 0; x < w; x ++) {           \
    (dest) = (source) + (constant) * (alt_source_pre);      \
    increment_pointers();           \
  }                 \
  (line) += p;                \
  for(y = 1; y < h-1; y ++) {           \
    for(x = 0; x < w; x ++) {           \
      (dest) = (source) + (constant) * (alt_source);      \
      increment_pointers();           \
    }                 \
    (line) += p;              \
  }                 \
  for(x = 0; x < w; x ++) {           \
    (dest) = (source) + (constant) * (alt_source_post);     \
    increment_pointers();           \
  }                 \
} while(0)

Definition at line 154 of file wavelet2D.c.

Referenced by __wavelet2D_merge(), and __wavelet2D_split().


Function Documentation

static int __it_wavelet2D_copy ( it_wavelet2D_t it_this,
it_wavelet2D_t source 
) [static]

static void __wavelet2D_destructor ( it_object_t it_this  )  [static]

static void __wavelet2D_get_output_size ( it_transform2D_t transform,
idx_t width,
idx_t height 
) [static]

Definition at line 853 of file wavelet2D.c.

Referenced by it_instanciate().

static void __wavelet2D_get_size ( it_transform2D_t transform,
idx_t width,
idx_t height 
) [static]

Definition at line 876 of file wavelet2D.c.

References _it_wavelet2D_::height, IT_WAVELET2D, and _it_wavelet2D_::width.

Referenced by it_instanciate().

static void __wavelet2D_set_size ( it_transform2D_t transform,
idx_t  width,
idx_t  height 
) [static]

static int __wavelet_flatten ( it_wavelet2D_t it_this,
mat  image 
) [static]

static int __wavelet_unflatten ( it_wavelet2D_t it_this,
mat  image 
) [static]


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau