00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __it_wavelet_h
00026 #define __it_wavelet_h
00027
00028 #include <it/types.h>
00029 #include <it/mat.h>
00030 #include <it/transform.h>
00031
00032
00033
00034
00035
00036
00037
00038 typedef struct _wavelet_lifting_ {
00039 int const count;
00040 double const scale;
00041 double const *step;
00042 } it_wavelet_lifting_t;
00043
00044
00045 extern it_wavelet_lifting_t const *it_wavelet_lifting_97;
00046 extern it_wavelet_lifting_t const *it_wavelet_lifting_53;
00047
00048 typedef struct _it_wavelet_ {
00049 it_extends (it_transform_t);
00050
00051 void (*it_overloaded (destructor)) (it_object_t * it_this);
00052
00053 it_wavelet_lifting_t *lifting;
00054 idx_t length;
00055 int level;
00056 int levels;
00057 vec current;
00058 vec next;
00059
00060 } it_wavelet_t;
00061
00062 #define IT_WAVELET(x) IT_CAST(it_wavelet_t, x)
00063
00064 it_instanciate (it_wavelet_t);
00065
00066 static inline it_wavelet_t *it_wavelet_new (it_wavelet_lifting_t const
00067 *lifting, int level) {
00068 return (it_new_va (it_wavelet_t) (it_va, lifting, level));
00069 }
00070
00071 #define it_wavelet_transform(t, v) ((vec) it_transform(IT_WAVELET(t), (vec) v))
00072 #define it_wavelet_itransform(t, v) ((vec) it_itransform(IT_WAVELET(t), (vec) v))
00073 vec it_dwt (vec v, it_wavelet_lifting_t const *lifting, int levels);
00074 vec it_idwt (vec t, it_wavelet_lifting_t const *lifting, int levels);
00075
00076
00077
00078
00079
00080 vec *it_wavelet_split (vec wav, int nb_levels);
00081 vec it_wavelet_merge (vec * subbands, int nb_level);
00082
00083
00084
00085 #endif