00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _V_CODEBOOK_H_
00019 #define _V_CODEBOOK_H_
00020
00021 #include "ogg.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 typedef struct static_codebook{
00037 long dim;
00038 long entries;
00039 long *lengthlist;
00040
00041
00042 int maptype;
00043
00044
00045
00046
00047 long q_min;
00048 long q_delta;
00049 int q_quant;
00050 int q_sequencep;
00051
00052 long *quantlist;
00053
00054
00055 } static_codebook;
00056
00057 typedef struct codebook{
00058 long dim;
00059 long entries;
00060 long used_entries;
00061
00062
00063
00064 int binarypoint;
00065 ogg_int32_t *valuelist;
00066 ogg_uint32_t *codelist;
00067
00068 int *dec_index;
00069 char *dec_codelengths;
00070 ogg_uint32_t *dec_firsttable;
00071 int dec_firsttablen;
00072 int dec_maxlength;
00073
00074 long q_min;
00075 long q_delta;
00076
00077 } codebook;
00078
00079 extern void vorbis_staticbook_clear(static_codebook *b);
00080 extern void vorbis_staticbook_destroy(static_codebook *b);
00081 extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source);
00082
00083 extern void vorbis_book_clear(codebook *b);
00084 extern long _book_maptype1_quantvals(const static_codebook *b);
00085
00086 extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c);
00087
00088 extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
00089 extern long vorbis_book_decodevs_add(codebook *book, ogg_int32_t *a,
00090 oggpack_buffer *b,int n,int point);
00091 extern long vorbis_book_decodev_set(codebook *book, ogg_int32_t *a,
00092 oggpack_buffer *b,int n,int point);
00093 extern long vorbis_book_decodev_add(codebook *book, ogg_int32_t *a,
00094 oggpack_buffer *b,int n,int point);
00095 extern long vorbis_book_decodevv_add(codebook *book, ogg_int32_t **a,
00096 long off,int ch,
00097 oggpack_buffer *b,int n,int point);
00098
00099 extern int _ilog(unsigned int v);
00100
00101
00102 #endif