27 #ifndef AVCODEC_MJPEGENC_HUFFMAN_H
28 #define AVCODEC_MJPEGENC_HUFFMAN_H
75 int size,
int max_length);
const char const char void * val
int prob
number of occurences of this value in input
int probability[514]
probability of each item 3, 8, 18, 46
void ff_mjpegenc_huffman_compute_bits(PTable *prob_table, HuffTable *distincts, int size, int max_length)
Computes the length of the Huffman encoding for each distinct input value.
int nitems
number of items in the list and probability ex. 4
int items[257 *16]
chain of all individual values that make up items A, B, A, B, C, A, B, C, D, C, D, D, E
int item_idx[515]
index range for each item in items 0, 2, 5, 9, 13
int length
length of the encoding
void ff_mjpeg_encode_huffman_init(MJpegEncHuffmanContext *s)
int code
code is the input value
Used to store intermediate lists in the package merge algorithm.
Used to store optimal huffman encoding results.
void ff_mjpeg_encode_huffman_close(MJpegEncHuffmanContext *s, uint8_t bits[17], uint8_t val[], int max_nval)
Produces a Huffman encoding with a given input.
static void ff_mjpeg_encode_huffman_increment(MJpegEncHuffmanContext *s, uint8_t val)
Used to assign a occurrence count or "probability" to an input value.