#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) | |
mat * | it_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 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, | |||
l | ) | (shift_up(x, l) << l) |
Definition at line 185 of file wavelet2D.c.
Referenced by __it_wavelet2D_itransform(), __it_wavelet2D_transform(), __wavelet2D_merge(), __wavelet2D_set_size(), __wavelet2D_split(), __wavelet_flatten(), and __wavelet_unflatten().
#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, | |||
l | ) | ((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, | |||||
h | ) |
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().
static int __it_wavelet2D_copy | ( | it_wavelet2D_t * | it_this, | |
it_wavelet2D_t * | source | |||
) | [static] |
Definition at line 840 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _it_wavelet2D_::height, it_transform2D_set_size, _it_wavelet2D_::levels, vec_copy(), and _it_wavelet2D_::width.
Referenced by it_instanciate().
static Mat __it_wavelet2D_itransform | ( | it_transform2D_t * | transform, | |
Mat | __flat | |||
) | [static] |
Definition at line 794 of file wavelet2D.c.
References __wavelet2D_merge(), __wavelet_unflatten(), _it_wavelet2D_::buffer, _it_wavelet2D_::height, it_transform2D_clear_size, it_transform2D_set_size, IT_WAVELET2D, _it_wavelet2D_::level, _it_wavelet2D_::levels, mat_height(), mat_new(), mat_width(), round_up, Vec_header, and _it_wavelet2D_::width.
Referenced by it_instanciate().
static Mat __it_wavelet2D_transform | ( | it_transform2D_t * | transform, | |
Mat | __image | |||
) | [static] |
Definition at line 747 of file wavelet2D.c.
References __wavelet2D_split(), __wavelet_flatten(), _it_wavelet2D_::buffer, _it_wavelet2D_::height, it_transform2D_clear_size, it_transform2D_set_size, IT_WAVELET2D, _it_wavelet2D_::level, _it_wavelet2D_::levels, mat_height(), mat_new(), mat_width(), round_up, Vec_header, and _it_wavelet2D_::width.
Referenced by it_instanciate().
static void __wavelet2D_destructor | ( | it_object_t * | it_this | ) | [static] |
Definition at line 885 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _it_wavelet2D_::height, _it_wavelet2D_::it_overloaded(), IT_WAVELET2D, vec_delete(), and _it_wavelet2D_::width.
Referenced by it_instanciate().
static void __wavelet2D_get_output_size | ( | it_transform2D_t * | transform, | |
idx_t * | width, | |||
idx_t * | height | |||
) | [static] |
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 int __wavelet2D_merge | ( | it_wavelet2D_t * | wavelet | ) | [static] |
Definition at line 408 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _wavelet_lifting_::count, _it_wavelet2D_::height, hlifting, IT_EINVAL, _it_wavelet2D_::level, _it_wavelet2D_::levels, _it_wavelet2D_::lifting, round_up, _wavelet_lifting_::scale, scale, shift_up, _wavelet_lifting_::step, vlifting, and _it_wavelet2D_::width.
Referenced by __it_wavelet2D_itransform().
static void __wavelet2D_set_size | ( | it_transform2D_t * | transform, | |
idx_t | width, | |||
idx_t | height | |||
) | [static] |
Definition at line 859 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _it_wavelet2D_::height, IT_WAVELET2D, _it_wavelet2D_::levels, round_up, vec_delete(), vec_new(), and _it_wavelet2D_::width.
Referenced by it_instanciate().
static int __wavelet2D_split | ( | it_wavelet2D_t * | wavelet | ) | [static] |
Definition at line 188 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _wavelet_lifting_::count, _it_wavelet2D_::height, hlifting, IT_EINVAL, _it_wavelet2D_::level, _it_wavelet2D_::levels, _it_wavelet2D_::lifting, reset_pointers, round_up, _wavelet_lifting_::scale, scale, shift_up, _wavelet_lifting_::step, vlifting, and _it_wavelet2D_::width.
Referenced by __it_wavelet2D_transform().
static int __wavelet_flatten | ( | it_wavelet2D_t * | it_this, | |
mat | image | |||
) | [static] |
Definition at line 628 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _it_wavelet2D_::height, IT_EINVAL, _it_wavelet2D_::level, _it_wavelet2D_::levels, mat_height(), mat_width(), round_up, and _it_wavelet2D_::width.
Referenced by __it_wavelet2D_transform().
static int __wavelet_unflatten | ( | it_wavelet2D_t * | it_this, | |
mat | image | |||
) | [static] |
Definition at line 687 of file wavelet2D.c.
References _it_wavelet2D_::buffer, _it_wavelet2D_::height, IT_EINVAL, _it_wavelet2D_::level, _it_wavelet2D_::levels, mat_height(), mat_width(), round_up, and _it_wavelet2D_::width.
Referenced by __it_wavelet2D_itransform().
|
|