More VQ utility work. Utils now include:
[platform/upstream/libvorbis.git] / vq / bookutil.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: utility functions for loading .vqh and .vqd files
15  last mod: $Id: bookutil.h,v 1.1 2000/01/05 10:14:54 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _V_BOOKUTIL_H_
20 #define _V_BOOKUTIL_H_
21
22 #include <stdio.h>
23 #include "vorbis/codebook.h"
24
25 extern void      codebook_unquantize(codebook *b);
26 extern char     *get_line(FILE *in);
27 extern int       get_line_value(FILE *in,double *value);
28 extern int       get_next_value(FILE *in,double *value);
29 extern int       get_next_ivalue(FILE *in,long *ivalue);
30 extern void      reset_next_value(void);
31 extern int       get_vector(codebook *b,FILE *in,double *a);
32 extern char     *find_seek_to(FILE *in,char *s);
33
34 extern codebook *codebook_load(char *filename);
35 extern int       codebook_entry(codebook *b,double *val);
36
37
38 extern long float24_pack(double val);
39 extern double float24_unpack(long val);
40
41 #endif
42