zdftrees.cpp File Reference

(r1785/r817)

#include "camtypes.h"
#include "zdeflate.h"

Go to the source code of this file.

Classes

struct  static_tree_desc_s

Defines

#define new   CAM_DEBUG_NEW
#define Freq   fc.freq
#define Code   fc.code
#define Dad   dl.dad
#define Len   dl.len
#define MAX_BL_BITS   7
#define END_BLOCK   256
#define REP_3_6   16
#define REPZ_3_10   17
#define REPZ_11_138   18
#define Buf_size   (8 * 2*sizeof(char))
#define send_code(s, c, tree)   send_bits(s, tree[c].Code, tree[c].Len)
#define d_code(dist)   ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
#define put_short(s, w)
#define send_bits(s, value, length)
#define MAX(a, b)   (a >= b ? a : b)
#define SMALLEST   1
#define pqremove(s, tree, top)
#define smaller(tree, n, m, depth)

Functions

 DECLARE_SOURCE ("$Revision: 817 $")

Variables

INT32 extra_lbits [29] = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}
INT32 extra_dbits [30] = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}
INT32 extra_blbits [19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}
uch bl_order [19] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}
ct_data static_ltree [(256+1+29)+2]
ct_data static_dtree [30]
uch dist_code [512]
uch length_code [258-3+1]
INT32 base_length [29]
INT32 base_dist [30]
static_tree_desc static_l_desc
static_tree_desc static_d_desc
static_tree_desc static_bl_desc


Define Documentation

#define Buf_size   (8 * 2*sizeof(char))
 

Definition at line 184 of file zdftrees.cpp.

#define Code   fc.code
 

Definition at line 146 of file zdftrees.cpp.

#define d_code dist   )     ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
 

Definition at line 252 of file zdftrees.cpp.

#define Dad   dl.dad
 

Definition at line 147 of file zdftrees.cpp.

#define END_BLOCK   256
 

Definition at line 157 of file zdftrees.cpp.

#define Freq   fc.freq
 

Definition at line 145 of file zdftrees.cpp.

#define Len   dl.len
 

Definition at line 148 of file zdftrees.cpp.

#define MAX a,
 )     (a >= b ? a : b)
 

Definition at line 314 of file zdftrees.cpp.

#define MAX_BL_BITS   7
 

Definition at line 154 of file zdftrees.cpp.

#define new   CAM_DEBUG_NEW
 

Definition at line 114 of file zdftrees.cpp.

#define pqremove s,
tree,
top   ) 
 

Value:

{\
    top = s->heap[SMALLEST]; \
    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
    pqdownheap(s, tree, SMALLEST); \
}

Definition at line 466 of file zdftrees.cpp.

#define put_short s,
 ) 
 

Value:

{ \
    put_byte(s, (uch)((w) & 0xff)); \
    put_byte(s, (uch)((ush)(w) >> 8)); \
}

Definition at line 263 of file zdftrees.cpp.

#define REP_3_6   16
 

Definition at line 160 of file zdftrees.cpp.

#define REPZ_11_138   18
 

Definition at line 166 of file zdftrees.cpp.

#define REPZ_3_10   17
 

Definition at line 163 of file zdftrees.cpp.

#define send_bits s,
value,
length   ) 
 

Value:

{ INT32 len = length;\
  if (s->bi_valid > (INT32)Buf_size - len) {\
    INT32 val = value;\
    s->bi_buf |= (val << s->bi_valid);\
    put_short(s, s->bi_buf);\
    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
    s->bi_valid += len - Buf_size;\
  } else {\
    s->bi_buf |= (value) << s->bi_valid;\
    s->bi_valid += len;\
  }\
}

Definition at line 298 of file zdftrees.cpp.

#define send_code s,
c,
tree   )     send_bits(s, tree[c].Code, tree[c].Len)
 

Definition at line 243 of file zdftrees.cpp.

#define smaller tree,
n,
m,
depth   ) 
 

Value:

(tree[n].Freq < tree[m].Freq || \
   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))

Definition at line 477 of file zdftrees.cpp.

#define SMALLEST   1
 

Definition at line 458 of file zdftrees.cpp.


Function Documentation

DECLARE_SOURCE "$Revision: 817 $"   ) 
 


Variable Documentation

INT32 base_dist[30]
 

Definition at line 218 of file zdftrees.cpp.

INT32 base_length[29]
 

Definition at line 215 of file zdftrees.cpp.

uch bl_order[19] = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}
 

Definition at line 179 of file zdftrees.cpp.

uch dist_code[512]
 

Definition at line 206 of file zdftrees.cpp.

INT32 extra_blbits[19] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}
 

Definition at line 176 of file zdftrees.cpp.

INT32 extra_dbits[30] = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}
 

Definition at line 173 of file zdftrees.cpp.

INT32 extra_lbits[29] = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}
 

Definition at line 170 of file zdftrees.cpp.

uch length_code[258-3+1]
 

Definition at line 212 of file zdftrees.cpp.

static_tree_desc static_bl_desc
 

Initial value:

{(ct_data *)0, extra_blbits, 0,       19 ,  7 }

Definition at line 235 of file zdftrees.cpp.

static_tree_desc static_d_desc
 

Initial value:

{static_dtree, extra_dbits, 0,           30 ,  15 }

Definition at line 232 of file zdftrees.cpp.

ct_data static_dtree[30]
 

Definition at line 201 of file zdftrees.cpp.

static_tree_desc static_l_desc
 

Initial value:

{static_ltree, extra_lbits,  256 +1,  ( 256 +1+ 29 ) ,  15 }

Definition at line 229 of file zdftrees.cpp.

ct_data static_ltree[(256+1+29)+2]
 

Definition at line 194 of file zdftrees.cpp.


Generated on Sat Nov 10 03:49:25 2007 for Camelot by  doxygen 1.4.4