zenilib
0.5.3.0
|
#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) |
#define VQ_FEXP 10 |
Definition at line 42 of file sharedbook.c.
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().
long _book_maptype1_quantvals | ( | const static_codebook * | b | ) |
Definition at line 163 of file sharedbook.c.
References static_codebook::dim, static_codebook::entries, entries, floor(), and i.
Referenced by _book_unquantize(), codebook_load(), main(), vorbis_book_init_encode(), vorbis_staticbook_pack(), vorbis_staticbook_unpack(), and write_codebook().
float* _book_unquantize | ( | const static_codebook * | b, |
int | n, | ||
int * | sparsemap | ||
) |
Definition at line 196 of file sharedbook.c.
References _book_maptype1_quantvals(), _float32_unpack(), _ogg_calloc, static_codebook::dim, static_codebook::entries, fabs(), j, k, static_codebook::lengthlist, static_codebook::maptype, NULL, static_codebook::q_delta, static_codebook::q_min, static_codebook::q_sequencep, and static_codebook::quantlist.
Referenced by codebook_load(), and vorbis_book_init_decode().
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().
Definition at line 29 of file sharedbook.c.
References ret.
Referenced by floor0_inverse1(), vorbis_book_init_decode(), vorbis_staticbook_pack(), and vorbis_staticbook_unpack().
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 |
Definition at line 299 of file sharedbook.c.
Referenced by vorbis_book_init_decode().
Definition at line 307 of file sharedbook.c.
Referenced by vorbis_book_init_decode().
Definition at line 270 of file sharedbook.c.
References _ogg_free, codebook::codelist, codebook::dec_codelengths, codebook::dec_firsttable, codebook::dec_index, memset, and codebook::valuelist.
Referenced by vorbis_book_init_decode(), and vorbis_info_clear().
Definition at line 437 of file sharedbook.c.
References codebook::c, and static_codebook::lengthlist.
Referenced by process_one().
Definition at line 430 of file sharedbook.c.
References codebook::c, and codebook::codelist.
int vorbis_book_init_decode | ( | codebook * | c, |
const static_codebook * | s | ||
) |
Definition at line 313 of file sharedbook.c.
References _book_unquantize(), _ilog(), _make_words(), _ogg_calloc, _ogg_free, _ogg_malloc, bitreverse(), codebook::codelist, codebook::dec_codelengths, codebook::dec_firsttable, codebook::dec_firsttablen, codebook::dec_index, codebook::dec_maxlength, static_codebook::dim, codebook::dim, static_codebook::entries, codebook::entries, cordic::hi, i, j, static_codebook::lengthlist, cordic::lo, memset, NULL, qsort(), sort32a(), codebook::used_entries, codebook::valuelist, and vorbis_book_clear().
Referenced by _vds_shared_init().
int vorbis_book_init_encode | ( | codebook * | c, |
const static_codebook * | s | ||
) |
Definition at line 283 of file sharedbook.c.
References _book_maptype1_quantvals(), _float32_unpack(), _make_words(), codebook::c, codebook::codelist, codebook::delta, static_codebook::dim, codebook::dim, static_codebook::entries, codebook::entries, int, static_codebook::lengthlist, memset, codebook::minval, static_codebook::q_delta, static_codebook::q_min, codebook::quantvals, and codebook::used_entries.
Referenced by _vds_shared_init(), and codebook_load().
void vorbis_staticbook_destroy | ( | static_codebook * | b | ) |
Definition at line 261 of file sharedbook.c.
References _ogg_free, static_codebook::allocedp, static_codebook::lengthlist, memset, and static_codebook::quantlist.
Referenced by _vds_shared_init(), vorbis_info_clear(), and vorbis_staticbook_unpack().