| 1 |
/* |
| 2 |
* bintree.h |
| 3 |
* |
| 4 |
* Written by: Ullrich Hafner |
| 5 |
* |
| 6 |
* This file is part of FIASCO (Fractal Image And Sequence COdec) |
| 7 |
* Copyright (C) 1994-2000 Ullrich Hafner |
| 8 |
*/ |
| 9 |
|
| 10 |
/* |
| 11 |
* $Date: 2000/06/14 20:50:51 $ |
| 12 |
* $Author: hafner $ |
| 13 |
* $Revision: 5.1 $ |
| 14 |
* $State: Exp $ |
| 15 |
*/ |
| 16 |
|
| 17 |
#ifndef _BINTREE_H |
| 18 |
#define _BINTREE_H |
| 19 |
|
| 20 |
#include "wfa.h" |
| 21 |
#include "types.h" |
| 22 |
|
| 23 |
typedef struct tree |
| 24 |
/* |
| 25 |
* Used for estimating the number of bits needed for storing the |
| 26 |
* tree array. For each level a different context is used. |
| 27 |
* The binary alphabet consists of the two symbols NO_RANGE and RANGE, |
| 28 |
* which indicate whether there exists a tree edge or not. |
| 29 |
*/ |
| 30 |
{ |
| 31 |
unsigned counts [MAXLEVEL]; /* # NO_RANGE symbols at given level */ |
| 32 |
unsigned total [MAXLEVEL]; /* total number of symbols at '' */ |
| 33 |
} tree_t; |
| 34 |
|
| 35 |
real_t |
| 36 |
tree_bits (bool_t child, unsigned level, const tree_t *model); |
| 37 |
void |
| 38 |
init_tree_model (tree_t *tree_model); |
| 39 |
void |
| 40 |
tree_update (bool_t child, unsigned level, tree_t *model); |
| 41 |
|
| 42 |
#endif /* not _BINTREE_H */ |
| 43 |
|