Go to the documentation of this file.
27 #ifndef AVCODEC_MJPEGENC_HUFFMAN_H
28 #define AVCODEC_MJPEGENC_HUFFMAN_H
75 int size,
int max_length);
int item_idx[515]
index range for each item in items 0, 2, 5, 9, 13
int prob
number of occurences of this value in input
int nitems
number of items in the list and probability ex. 4
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.
Used to assign a occurrence count or "probability" to an input value.
Used to store optimal huffman encoding results.
int code
code is the input value
Used to store intermediate lists in the package merge algorithm.
static void ff_mjpeg_encode_huffman_increment(MJpegEncHuffmanContext *s, uint8_t val)
int length
length of the encoding
const char const char void * val
void ff_mjpeg_encode_huffman_init(MJpegEncHuffmanContext *s)
int items[257 *16]
chain of all individual values that make up items A, B, A, B, C, A, B, C, D, C, D,...
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 probability[514]
probability of each item 3, 8, 18, 46