Encoder  4.4
VC-5 Sample Encoder
codebooks.h
Go to the documentation of this file.
1 
15 #ifndef _CODEBOOKS_H
16 #define _CODEBOOKS_H
17 
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 //CODEC_ERROR InitCodebooks(ALLOCATOR *allocator, CODESET *cs);
25 
26 //CODEC_ERROR FreeCodebooks(ALLOCATOR *allocator, CODESET *cs);
28 
29 
31  RLV *input_codes, int input_length,
32  RLC *output_codes, int output_length);
33 
34 CODEC_ERROR SortDecreasingRunLength(RLC *codebook, int length);
35 
36 CODEC_ERROR FillRunLengthEncodingTable(RLC *codebook, int codebook_length,
37  RLC *table, int table_length);
38 
39 CODEC_ERROR FillMagnitudeEncodingTable(const CODEBOOK *codebook, VLE *table, int size, uint32_t flags);
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif
CODEC_ERROR SortDecreasingRunLength(RLC *codebook, int length)
Sort the codebook into decreasing length of the run.
Definition: codebooks.c:169
Entry in the table for encoding coefficients magnitudes.
Definition: vlc.h:103
CODEC_ERROR ComputeRunLengthCodeTable(ALLOCATOR *allocator, RLV *input_codes, int input_length, RLC *output_codes, int output_length)
Compute a table of codewords for runs of zeros.
Definition: codebooks.c:103
Codebook entries for arbitrary runs and values.
Definition: vlc.h:28
enum _codec_error CODEC_ERROR
Codec error codes.
void * ALLOCATOR
Opaque data type for the default memory allocator.
Definition: allocator.h:20
CODEC_ERROR FillMagnitudeEncodingTable(const CODEBOOK *codebook, VLE *table, int size, uint32_t flags)
Fill lookup table for encoding coefficient magnitudes.
Definition: codebooks.c:306
Definition: codeset.h:41
Declaration of a codebook.
Definition: vlc.h:52
CODEC_ERROR ReleaseCodebooks(ALLOCATOR *allocator, CODESET *cs)
Free all data structures allocated for the codebooks.
Definition: codebooks.c:91
CODEC_ERROR FillRunLengthEncodingTable(RLC *codebook, int codebook_length, RLC *table, int table_length)
Use a sparse run length code table to create an indexable table for faster encoding.
Definition: codebooks.c:209
Entry in the table for encoding runs of zeros.
Definition: vlc.h:136
CODEC_ERROR PrepareCodebooks(ALLOCATOR *allocator, CODESET *cs)
Initialize the codeset by creating more efficient tables for encoding.
Definition: codebooks.c:25