Utah Raster Toolkit
9999-git
URT Development version (post-3.1b)
|
Go to the source code of this file.
Data Structures | |
struct | _color |
struct | _histogram |
struct | _bounds |
struct | _color_box |
Macros | |
#define | MAX(i, j) ( (i) > (j) ? (i) : (j) ) |
#define | MIN(i, j) ( (i) < (j) ? (i) : (j) ) |
#define | TLISTLINKS(type) type * next, * prev |
#define | P(node) ((node)->prev) |
#define | N(node) ((node)->next) |
#define | TRACE(t_var, ini) for((t_var)=(ini);(t_var)!=NULL;(t_var)=N(t_var)) |
#define | ADD(new, first) |
#define | INSERT(new, after) |
#define | BLUEMASK(x) ((x) & 0x1f) |
#define | GREENMASK(x) (((x)>>5) & 0x1f) |
#define | REDMASK(x) (((x)>>10) & 0x1f) |
#define | TO_5_BITS(x) (((x)>>3) & 0x1f) |
#define | FROM_5_BITS(x) (((x)<<3) & 0xff) |
#define | PACK_15(r, g, b) (TO_5_BITS(r)<<10 | TO_5_BITS(g)<<5 | TO_5_BITS(b)) |
#define | FAST_PACK(r, g, b) (((r)&0xf8)<<7 | ((g)&0xf8)<<2 | (TO_5_BITS(b))) |
#define | DISTANCE(x, y) |
Typedefs | |
typedef struct _color | color_t |
typedef struct _color_box | color_box_t |
typedef struct _histogram | histogram_t |
typedef struct _bounds | bounds_t |
Functions | |
void | subdivide () |
void | sum_hist () |
void | average_colors () |
void | calc_inverse_map () |
void | make_rle_map () |
void | re_expand_map () |
void | quantize_dither_rle () |
void | quantize_rle () |
void | free_hist () |
void | bound_rgb () |
void | set_size_axis () |
int | break_box () |
void | radix_sort () |
void | main (int argc, char **argv) |
color_box_t * | split_box (color_box_t *box) |
void | quantize_rle (rle_pixel **scan) |
void | quantize_dither_rle (rle_pixel **scan) |
int | resort_compare (histogram_t **c1, histogram_t **c2) |
void | set_size_axis (color_box_t *cb) |
void | bound_rgb (color_box_t *box) |
void | radix_sort (color_box_t *bbox, int start_bit, int num_bits) |
int | cmp_radices (histogram_t **h1, histogram_t **h2) |
color_box_t * | insert_elt (color_box_t *list, color_box_t *elt) |
Variables | |
color_box_t * | cb_list |
color_box_t * | cb |
int | cb_list_size |
static unsigned | mask |
short | out_map [3][256] |
rle_hdr | in_hdr |
rle_hdr | out_hdr |
int | max_colors = 200 |
histogram_t * | hist [32768] |
int | hist_size |
char * | cmd_nm |
#define ADD | ( | new, | |
first | |||
) |
#define INSERT | ( | new, | |
after | |||
) |
#define TRACE | ( | t_var, | |
ini | |||
) | for((t_var)=(ini);(t_var)!=NULL;(t_var)=N(t_var)) |
typedef struct _color_box color_box_t |
typedef struct _histogram histogram_t |
void average_colors | ( | ) |
Definition at line 527 of file mcut.c.
References _color::b, cb_list, _histogram::color, _color_box::color, _color::g, _color_box::hist, _color_box::hsize, _histogram::nsamples, and _color::r.
void bound_rgb | ( | ) |
void bound_rgb | ( | color_box_t * | box | ) |
Definition at line 910 of file mcut.c.
Referenced by sum_hist().
int break_box | ( | ) |
Definition at line 433 of file mcut.c.
References _color_box::axis, cb_list, cb_list_size, insert_elt(), radix_sort(), and split_box().
Referenced by subdivide().
void calc_inverse_map | ( | ) |
Definition at line 565 of file mcut.c.
References _color::b, cb_list, _histogram::color, _color_box::color, _histogram::color_ptr, _color::g, _color_box::hist, _color_box::hsize, and _color::r.
int cmp_radices | ( | histogram_t ** | h1, |
histogram_t ** | h2 | ||
) |
void free_hist | ( | ) |
Definition at line 1035 of file mcut.c.
References cb_list, cb_list_size, and hist.
color_box_t* insert_elt | ( | color_box_t * | list, |
color_box_t * | elt | ||
) |
Definition at line 983 of file mcut.c.
Referenced by break_box().
void main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 236 of file mcut.c.
void make_rle_map | ( | ) |
Definition at line 602 of file mcut.c.
References _color::b, cb_list, _color_box::cindex, _color_box::color, _color::g, out_map, and _color::r.
void quantize_dither_rle | ( | ) |
void quantize_dither_rle | ( | rle_pixel ** | scan | ) |
Definition at line 686 of file mcut.c.
void quantize_rle | ( | ) |
void quantize_rle | ( | rle_pixel ** | scan | ) |
void radix_sort | ( | ) |
void radix_sort | ( | color_box_t * | bbox, |
int | start_bit, | ||
int | num_bits | ||
) |
Definition at line 944 of file mcut.c.
Referenced by break_box().
void re_expand_map | ( | ) |
Definition at line 626 of file mcut.c.
References _color_box::cindex, _histogram::cmap_index, _histogram::color, _histogram::color_ptr, hist, hist_size, and resort_compare().
int resort_compare | ( | histogram_t ** | c1, |
histogram_t ** | c2 | ||
) |
Definition at line 855 of file mcut.c.
Referenced by re_expand_map().
void set_size_axis | ( | ) |
void set_size_axis | ( | color_box_t * | cb | ) |
Definition at line 868 of file mcut.c.
Referenced by sum_hist().
color_box_t* split_box | ( | color_box_t * | box | ) |
Definition at line 480 of file mcut.c.
Referenced by break_box().
void subdivide | ( | ) |
Definition at line 416 of file mcut.c.
References break_box(), cb_list_size, and max_colors.
void sum_hist | ( | ) |
Definition at line 376 of file mcut.c.
References bound_rgb(), cb, cb_list, cb_list_size, cmd_nm, _color_box::hist, hist, hist_size, _color_box::hsize, _histogram::nsamples, _color_box::nsamples, and set_size_axis().
color_box_t * cb |
Definition at line 159 of file mcut.c.
Referenced by sum_hist().
color_box_t* cb_list |
Definition at line 159 of file mcut.c.
Referenced by average_colors(), break_box(), calc_inverse_map(), free_hist(), make_rle_map(), and sum_hist().
int cb_list_size |
Definition at line 161 of file mcut.c.
Referenced by break_box(), free_hist(), subdivide(), and sum_hist().
char* cmd_nm |
Definition at line 169 of file mcut.c.
Referenced by sum_hist().
histogram_t* hist[32768] |
Definition at line 167 of file mcut.c.
Referenced by free_hist(), re_expand_map(), and sum_hist().
int hist_size |
Definition at line 168 of file mcut.c.
Referenced by re_expand_map(), and sum_hist().
int max_colors = 200 |
Definition at line 166 of file mcut.c.
Referenced by subdivide().
short out_map[3][256] |
Definition at line 163 of file mcut.c.
Referenced by make_rle_map().