com.fluendo.jheora
Class Huffman

java.lang.Object
  extended by com.fluendo.jheora.Huffman

public class Huffman
extends java.lang.Object


Field Summary
static int AC_HUFF_CHOICE_BITS
           
static int AC_HUFF_CHOICES
           
static int AC_HUFF_OFFSET
           
static int AC_TABLE_2_THRESH
           
static int AC_TABLE_3_THRESH
           
static int AC_TABLE_4_THRESH
           
static int DC_HUFF_CHOICE_BITS
           
static int DC_HUFF_CHOICES
           
static int DC_HUFF_OFFSET
           
static int DCT_EOB_PAIR_TOKEN
           
static int DCT_EOB_TOKEN
           
static int DCT_EOB_TRIPLE_TOKEN
           
static int DCT_REPEAT_RUN_TOKEN
           
static int DCT_REPEAT_RUN2_TOKEN
           
static int DCT_REPEAT_RUN3_TOKEN
           
static int DCT_REPEAT_RUN4_TOKEN
           
static int DCT_RUN_CATEGORY1
           
static int DCT_RUN_CATEGORY1B
           
static int DCT_RUN_CATEGORY1C
           
static int DCT_RUN_CATEGORY2
           
static int DCT_SHORT_ZRL_TOKEN
           
static int DCT_VAL_CAT2_MIN
           
static int DCT_VAL_CAT3_MIN
           
static int DCT_VAL_CAT4_MIN
           
static int DCT_VAL_CAT5_MIN
           
static int DCT_VAL_CAT6_MIN
           
static int DCT_VAL_CAT7_MIN
           
static int DCT_VAL_CAT8_MIN
           
static int DCT_VAL_CATEGORY3
           
static int DCT_VAL_CATEGORY4
           
static int DCT_VAL_CATEGORY5
           
static int DCT_VAL_CATEGORY6
           
static int DCT_VAL_CATEGORY7
           
static int DCT_VAL_CATEGORY8
           
static int DCT_ZRL_TOKEN
           
static int LOW_VAL_TOKENS
           
static int MAX_ENTROPY_TOKENS
           
static int MAX_SINGLE_TOKEN_VALUE
           
static int MINUS_ONE_TOKEN
           
static int MINUS_TWO_TOKEN
           
static int NUM_HUFF_TABLES
           
static int ONE_TOKEN
           
static int TWO_TOKEN
           
 
Constructor Summary
Huffman()
           
 
Method Summary
static void buildHuffmanTree(HuffEntry[] huffRoot, int[] huffCodeArray, byte[] huffCodeLengthArray, int hIndex, short[] freqList)
           
static void clearHuffmanTrees(HuffEntry[] huffRoot)
           
static int readHuffmanTrees(HuffEntry[] huffRoot, com.jcraft.jogg.Buffer opb)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_HUFF_TABLES

public static final int NUM_HUFF_TABLES
See Also:
Constant Field Values

DC_HUFF_OFFSET

public static final int DC_HUFF_OFFSET
See Also:
Constant Field Values

AC_HUFF_OFFSET

public static final int AC_HUFF_OFFSET
See Also:
Constant Field Values

AC_TABLE_2_THRESH

public static final int AC_TABLE_2_THRESH
See Also:
Constant Field Values

AC_TABLE_3_THRESH

public static final int AC_TABLE_3_THRESH
See Also:
Constant Field Values

AC_TABLE_4_THRESH

public static final int AC_TABLE_4_THRESH
See Also:
Constant Field Values

DC_HUFF_CHOICES

public static final int DC_HUFF_CHOICES
See Also:
Constant Field Values

DC_HUFF_CHOICE_BITS

public static final int DC_HUFF_CHOICE_BITS
See Also:
Constant Field Values

AC_HUFF_CHOICES

public static final int AC_HUFF_CHOICES
See Also:
Constant Field Values

AC_HUFF_CHOICE_BITS

public static final int AC_HUFF_CHOICE_BITS
See Also:
Constant Field Values

MAX_SINGLE_TOKEN_VALUE

public static final int MAX_SINGLE_TOKEN_VALUE
See Also:
Constant Field Values

DCT_VAL_CAT2_MIN

public static final int DCT_VAL_CAT2_MIN
See Also:
Constant Field Values

DCT_VAL_CAT3_MIN

public static final int DCT_VAL_CAT3_MIN
See Also:
Constant Field Values

DCT_VAL_CAT4_MIN

public static final int DCT_VAL_CAT4_MIN
See Also:
Constant Field Values

DCT_VAL_CAT5_MIN

public static final int DCT_VAL_CAT5_MIN
See Also:
Constant Field Values

DCT_VAL_CAT6_MIN

public static final int DCT_VAL_CAT6_MIN
See Also:
Constant Field Values

DCT_VAL_CAT7_MIN

public static final int DCT_VAL_CAT7_MIN
See Also:
Constant Field Values

DCT_VAL_CAT8_MIN

public static final int DCT_VAL_CAT8_MIN
See Also:
Constant Field Values

DCT_EOB_TOKEN

public static final int DCT_EOB_TOKEN
See Also:
Constant Field Values

DCT_EOB_PAIR_TOKEN

public static final int DCT_EOB_PAIR_TOKEN
See Also:
Constant Field Values

DCT_EOB_TRIPLE_TOKEN

public static final int DCT_EOB_TRIPLE_TOKEN
See Also:
Constant Field Values

DCT_REPEAT_RUN_TOKEN

public static final int DCT_REPEAT_RUN_TOKEN
See Also:
Constant Field Values

DCT_REPEAT_RUN2_TOKEN

public static final int DCT_REPEAT_RUN2_TOKEN
See Also:
Constant Field Values

DCT_REPEAT_RUN3_TOKEN

public static final int DCT_REPEAT_RUN3_TOKEN
See Also:
Constant Field Values

DCT_REPEAT_RUN4_TOKEN

public static final int DCT_REPEAT_RUN4_TOKEN
See Also:
Constant Field Values

DCT_SHORT_ZRL_TOKEN

public static final int DCT_SHORT_ZRL_TOKEN
See Also:
Constant Field Values

DCT_ZRL_TOKEN

public static final int DCT_ZRL_TOKEN
See Also:
Constant Field Values

ONE_TOKEN

public static final int ONE_TOKEN
See Also:
Constant Field Values

MINUS_ONE_TOKEN

public static final int MINUS_ONE_TOKEN
See Also:
Constant Field Values

TWO_TOKEN

public static final int TWO_TOKEN
See Also:
Constant Field Values

MINUS_TWO_TOKEN

public static final int MINUS_TWO_TOKEN
See Also:
Constant Field Values

LOW_VAL_TOKENS

public static final int LOW_VAL_TOKENS
See Also:
Constant Field Values

DCT_VAL_CATEGORY3

public static final int DCT_VAL_CATEGORY3
See Also:
Constant Field Values

DCT_VAL_CATEGORY4

public static final int DCT_VAL_CATEGORY4
See Also:
Constant Field Values

DCT_VAL_CATEGORY5

public static final int DCT_VAL_CATEGORY5
See Also:
Constant Field Values

DCT_VAL_CATEGORY6

public static final int DCT_VAL_CATEGORY6
See Also:
Constant Field Values

DCT_VAL_CATEGORY7

public static final int DCT_VAL_CATEGORY7
See Also:
Constant Field Values

DCT_VAL_CATEGORY8

public static final int DCT_VAL_CATEGORY8
See Also:
Constant Field Values

DCT_RUN_CATEGORY1

public static final int DCT_RUN_CATEGORY1
See Also:
Constant Field Values

DCT_RUN_CATEGORY1B

public static final int DCT_RUN_CATEGORY1B
See Also:
Constant Field Values

DCT_RUN_CATEGORY1C

public static final int DCT_RUN_CATEGORY1C
See Also:
Constant Field Values

DCT_RUN_CATEGORY2

public static final int DCT_RUN_CATEGORY2
See Also:
Constant Field Values

MAX_ENTROPY_TOKENS

public static final int MAX_ENTROPY_TOKENS
See Also:
Constant Field Values
Constructor Detail

Huffman

public Huffman()
Method Detail

buildHuffmanTree

public static void buildHuffmanTree(HuffEntry[] huffRoot,
                                    int[] huffCodeArray,
                                    byte[] huffCodeLengthArray,
                                    int hIndex,
                                    short[] freqList)

readHuffmanTrees

public static int readHuffmanTrees(HuffEntry[] huffRoot,
                                   com.jcraft.jogg.Buffer opb)

clearHuffmanTrees

public static void clearHuffmanTrees(HuffEntry[] huffRoot)