| 
0
 | 
     1 #ifndef WANG_COMMON_H
 | 
| 
 | 
     2 #define WANG_COMMON_H
 | 
| 
 | 
     3 
 | 
| 
 | 
     4 #include "dwt.h"
 | 
| 
 | 
     5 
 | 
| 
 | 
     6 typedef struct Subband_data_struct {
 | 
| 
 | 
     7   double T;
 | 
| 
 | 
     8   double Cmax;
 | 
| 
 | 
     9   double beta;
 | 
| 
 | 
    10   Image_tree tree;
 | 
| 
 | 
    11   int level;
 | 
| 
 | 
    12   int type;
 | 
| 
 | 
    13   int width;
 | 
| 
 | 
    14   int height;
 | 
| 
 | 
    15   int size;
 | 
| 
 | 
    16   Image image;
 | 
| 
 | 
    17   char** selected;
 | 
| 
 | 
    18 } *Subband_data;
 | 
| 
 | 
    19 
 | 
| 
 | 
    20 void init_subbands(Image_tree tree);
 | 
| 
 | 
    21 Subband_data alloc_subband(int type, Image_tree tree);
 | 
| 
 | 
    22 void free_subband(Subband_data subband);
 | 
| 
 | 
    23 void free_subbands();
 | 
| 
 | 
    24 
 | 
| 
 | 
    25 void set_subband_beta(Subband_data subband, double beta);
 | 
| 
 | 
    26 void set_subbands_beta(double beta);
 | 
| 
 | 
    27 void set_subbands_type_beta(int type, double beta);
 | 
| 
 | 
    28 
 | 
| 
 | 
    29 void calc_subband_threshold(Subband_data subband);
 | 
| 
 | 
    30 void calc_subbands_threshold();
 | 
| 
 | 
    31 
 | 
| 
 | 
    32 int subband_coeff_isselected(Subband_data subband, int coeff);
 | 
| 
 | 
    33 Pixel get_subband_coeff(Subband_data subband, int coeff);
 | 
| 
 | 
    34 void set_subband_coeff(Subband_data subband, int coeff, Pixel data);
 | 
| 
 | 
    35 
 | 
| 
 | 
    36 Subband_data select_subband();
 | 
| 
 | 
    37 int select_subband_coeff_from(Subband_data subband, int from);
 | 
| 
 | 
    38 int select_subband_coeff(Subband_data subband);
 | 
| 
 | 
    39 void mark_subband_coeff(Subband_data subband, int coeff);
 | 
| 
 | 
    40 
 | 
| 
 | 
    41 Pixel figure_orig_coeff(double T, double alpha, double beta, Pixel coeff);
 | 
| 
 | 
    42 
 | 
| 
 | 
    43 #endif
 |