FFmpeg
Data Structures | Macros | Typedefs | Functions
huffman.h File Reference
#include <stdint.h>
#include "vlc.h"

Go to the source code of this file.

Data Structures

struct  Node
 

Macros

#define FF_HUFFMAN_FLAG_HNODE_FIRST   0x01
 
#define FF_HUFFMAN_FLAG_ZERO_COUNT   0x02
 
#define FF_HUFFMAN_BITS   10
 

Typedefs

typedef int(* HuffCmp) (const void *va, const void *vb)
 

Functions

int ff_huff_build_tree (void *logctx, VLC *vlc, int nb_codes, int nb_bits, Node *nodes, HuffCmp cmp, int flags)
 nodes size must be 2*nb_codes first nb_codes nodes.count must be set More...
 
int ff_huff_gen_len_table (uint8_t *dst, const uint64_t *stats, int n, int skip0)
 

Detailed Description

huffman tree builder and VLC generator

Definition in file huffman.h.

Macro Definition Documentation

◆ FF_HUFFMAN_FLAG_HNODE_FIRST

#define FF_HUFFMAN_FLAG_HNODE_FIRST   0x01

Definition at line 39 of file huffman.h.

◆ FF_HUFFMAN_FLAG_ZERO_COUNT

#define FF_HUFFMAN_FLAG_ZERO_COUNT   0x02

Definition at line 40 of file huffman.h.

◆ FF_HUFFMAN_BITS

#define FF_HUFFMAN_BITS   10

Definition at line 41 of file huffman.h.

Typedef Documentation

◆ HuffCmp

typedef int(* HuffCmp) (const void *va, const void *vb)

Definition at line 43 of file huffman.h.

Function Documentation

◆ ff_huff_build_tree()

int ff_huff_build_tree ( void *  logctx,
VLC vlc,
int  nb_codes,
int  nb_bits,
Node nodes,
HuffCmp  cmp,
int  flags 
)

nodes size must be 2*nb_codes first nb_codes nodes.count must be set

Definition at line 159 of file huffman.c.

Referenced by fraps2_decode_plane(), and vp6_build_huff_tree().

◆ ff_huff_gen_len_table()

int ff_huff_gen_len_table ( uint8_t *  dst,
const uint64_t *  stats,
int  n,
int  skip0 
)

Definition at line 60 of file huffman.c.

Referenced by encode_plane(), and store_huffman_tables().