84d1ffa89e44fe60f238817cd7d09655749648d7
[platform/upstream/libvorbis.git] / lib / bookinternal.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE.  *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5  * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE.    *
6  * PLEASE READ THESE TERMS DISTRIBUTING.                            *
7  *                                                                  *
8  * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
9  * by Monty <monty@xiph.org> and The XIPHOPHORUS Company            *
10  * http://www.xiph.org/                                             *
11  *                                                                  *
12  ********************************************************************
13
14  function: basic codebook pack/unpack/code/decode operations
15  last mod: $Id: bookinternal.h,v 1.2 2000/01/12 11:16:36 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _V_INT_CODEBOOK_H_
20 #define _V_INT_CODEBOOK_H_
21
22 #include "vorbis/codebook.h"
23 #include "bitwise.h"
24
25 /* some elements in the codebook structure are assumed to be pointers
26    to static/shared storage (the pointers are duped, and free below
27    does not touch them.  The fields are unused by decode):
28
29    quantlist,
30    lengthlist,
31    encode_tree
32
33 */ 
34
35 extern void vorbis_book_dup(codebook *dest,const codebook *source);
36 extern void vorbis_book_free(codebook *b);
37 extern int vorbis_book_pack(codebook *c,oggpack_buffer *b);
38 extern int vorbis_book_unpack(oggpack_buffer *b,codebook *c);
39
40 extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b);
41 extern int vorbis_book_encodev(codebook *book, double *a, oggpack_buffer *b);
42 extern long vorbis_book_decode(codebook *book, oggpack_buffer *b);
43 extern long vorbis_book_decodev(codebook *book, double *a, oggpack_buffer *b);
44
45 #endif