RetroArch
Macros | Functions
libchdr_huffman.c File Reference
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <libchdr/huffman.h>
#include <libchdr/minmax.h>
Include dependency graph for libchdr_huffman.c:

Macros

#define MAKE_LOOKUP(code, bits)   (((code) << 5) | ((bits) & 0x1f))
 

Functions

struct huffman_decodercreate_huffman_decoder (int numcodes, int maxbits)
 
void delete_huffman_decoder (struct huffman_decoder *decoder)
 
uint32_t huffman_decode_one (struct huffman_decoder *decoder, struct bitstream *bitbuf)
 
enum huffman_error huffman_import_tree_rle (struct huffman_decoder *decoder, struct bitstream *bitbuf)
 
enum huffman_error huffman_import_tree_huffman (struct huffman_decoder *decoder, struct bitstream *bitbuf)
 
enum huffman_error huffman_compute_tree_from_histo (struct huffman_decoder *decoder)
 
static int huffman_tree_node_compare (const void *item1, const void *item2)
 
int huffman_build_tree (struct huffman_decoder *decoder, uint32_t totaldata, uint32_t totalweight)
 
enum huffman_error huffman_assign_canonical_codes (struct huffman_decoder *decoder)
 
void huffman_build_lookup_table (struct huffman_decoder *decoder)
 

Macro Definition Documentation

◆ MAKE_LOOKUP

#define MAKE_LOOKUP (   code,
  bits 
)    (((code) << 5) | ((bits) & 0x1f))

Function Documentation

◆ create_huffman_decoder()

struct huffman_decoder* create_huffman_decoder ( int  numcodes,
int  maxbits 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_huffman_decoder()

void delete_huffman_decoder ( struct huffman_decoder decoder)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ huffman_assign_canonical_codes()

enum huffman_error huffman_assign_canonical_codes ( struct huffman_decoder decoder)
Here is the caller graph for this function:

◆ huffman_build_lookup_table()

void huffman_build_lookup_table ( struct huffman_decoder decoder)
Here is the caller graph for this function:

◆ huffman_build_tree()

int huffman_build_tree ( struct huffman_decoder decoder,
uint32_t  totaldata,
uint32_t  totalweight 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ huffman_compute_tree_from_histo()

enum huffman_error huffman_compute_tree_from_histo ( struct huffman_decoder decoder)
Here is the call graph for this function:

◆ huffman_decode_one()

uint32_t huffman_decode_one ( struct huffman_decoder decoder,
struct bitstream bitbuf 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ huffman_import_tree_huffman()

enum huffman_error huffman_import_tree_huffman ( struct huffman_decoder decoder,
struct bitstream bitbuf 
)
Here is the call graph for this function:

◆ huffman_import_tree_rle()

enum huffman_error huffman_import_tree_rle ( struct huffman_decoder decoder,
struct bitstream bitbuf 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ huffman_tree_node_compare()

static int huffman_tree_node_compare ( const void item1,
const void item2 
)
static
Here is the caller graph for this function: