zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sharedbook.c File Reference
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ogg/ogg.h>
#include "os.h"
#include "misc.h"
#include "vorbis/codec.h"
#include "codebook.h"
#include "scales.h"

Go to the source code of this file.

Macros

#define VQ_FEXP   10
 
#define VQ_FEXP_BIAS   768 /* bias toward values smaller than 1. */
 
#define VQ_FMAN   21
 

Functions

long _book_maptype1_quantvals (const static_codebook *b)
 
float * _book_unquantize (const static_codebook *b, int n, int *sparsemap)
 
long _float32_pack (float val)
 
float _float32_unpack (long val)
 
int _ilog (unsigned int v)
 
ogg_uint32_t_make_words (long *l, long n, long sparsecount)
 
static ogg_uint32_t bitreverse (ogg_uint32_t x)
 
static int sort32a (const void *a, const void *b)
 
void vorbis_book_clear (codebook *b)
 
long vorbis_book_codelen (codebook *book, int entry)
 
long vorbis_book_codeword (codebook *book, int entry)
 
int vorbis_book_init_decode (codebook *c, const static_codebook *s)
 
int vorbis_book_init_encode (codebook *c, const static_codebook *s)
 
void vorbis_staticbook_destroy (static_codebook *b)
 

Macro Definition Documentation

#define VQ_FEXP   10

Definition at line 42 of file sharedbook.c.

#define VQ_FEXP_BIAS   768 /* bias toward values smaller than 1. */

Definition at line 44 of file sharedbook.c.

Referenced by _float32_pack(), and _float32_unpack().

#define VQ_FMAN   21

Definition at line 43 of file sharedbook.c.

Referenced by _float32_pack(), and _float32_unpack().

Function Documentation

long _float32_pack ( float  val)

Definition at line 47 of file sharedbook.c.

References floor(), sign, VQ_FEXP_BIAS, and VQ_FMAN.

Referenced by main(), and vqgen_quantize().

float _float32_unpack ( long  val)

Definition at line 62 of file sharedbook.c.

References sign, VQ_FEXP_BIAS, and VQ_FMAN.

Referenced by _book_unquantize(), main(), vorbis_book_init_encode(), vqgen_quantize(), and vqgen_unquantize().

int _ilog ( unsigned int  v)
ogg_uint32_t* _make_words ( long *  l,
long  n,
long  sparsecount 
)

Definition at line 73 of file sharedbook.c.

References _ogg_free, _ogg_malloc, i, j, memset, and NULL.

Referenced by vorbis_book_init_decode(), and vorbis_book_init_encode().

static ogg_uint32_t bitreverse ( ogg_uint32_t  x)
static

Definition at line 299 of file sharedbook.c.

Referenced by vorbis_book_init_decode().

static int sort32a ( const void a,
const void b 
)
static

Definition at line 307 of file sharedbook.c.

Referenced by vorbis_book_init_decode().

long vorbis_book_codelen ( codebook book,
int  entry 
)

Definition at line 437 of file sharedbook.c.

References codebook::c, and static_codebook::lengthlist.

Referenced by process_one().

long vorbis_book_codeword ( codebook book,
int  entry 
)

Definition at line 430 of file sharedbook.c.

References codebook::c, and codebook::codelist.