Incremental commit after rearranging build a bit and moving files into
[platform/upstream/libvorbis.git] / include / codec.h
similarity index 84%
rename from lib/codec.h
rename to include/codec.h
index 9169c4c..49fef7a 100644 (file)
@@ -14,7 +14,7 @@
  function: codec headers
  author: Monty <xiphmont@mit.edu>
  modifications by: Monty
- last modification date: Nov 04 1999
+ last modification date: Dec 29 1999
 
  ********************************************************************/
 
 
 #include <sys/types.h> /* get BSD style 16/32/64 bit types */
 
-/* If we have defines from the configure script, use those */
-#ifndef size64
-#  define size64 int64_t 
+/* if no BSD width types, get them from the configure script */
+#ifndef int64_t
+#  define int64_t size64
 #endif
-#ifndef size32
-#  define size32 int32_t 
+#ifndef int32_t
+#  define int32_t size32
 #endif
-#ifndef size16
-#  define size16 int16_t
+#ifndef int16_t
+#  define int16_t size16
 #endif
 
 /* lookup structures for various simple transforms *****************/
@@ -191,8 +191,8 @@ typedef struct {
   long    body_returned;         /* elements of fill returned */
 
 
-  int    *lacing_vals;    /* The values that will go to the segment table */
-  size64 *pcm_vals;      /* pcm_pos values for headers. Not compact
+  int     *lacing_vals;    /* The values that will go to the segment table */
+  int64_t *pcm_vals;      /* pcm_pos values for headers. Not compact
                             this way, but it is simple coupled to the
                             lacing fifo */
   long    lacing_storage;
@@ -214,7 +214,7 @@ typedef struct {
                              but we need coupling so that the codec
                              (which is in a seperate abstraction
                              layer) also knows about the gap */
-  size64   pcmpos;
+  int64_t   pcmpos;
 
 } ogg_stream_state;
 
@@ -227,7 +227,7 @@ typedef struct {
   long  b_o_s;
   long  e_o_s;
 
-  size64  frameno;
+  int64_t  frameno;
   long    packetno;       /* sequence number for decode; the framing
                              knows where there's a hole in the data,
                              but we need coupling so that the codec
@@ -282,10 +282,10 @@ typedef struct vorbis_dsp_state{
   long frameno;
   long sequence;
 
-  size64 gluebits;
-  size64 time_envelope_bits;
-  size64 spectral_envelope_bits;
-  size64 spectral_residue_bits;
+  int64_t gluebits;
+  int64_t time_envelope_bits;
+  int64_t spectral_envelope_bits;
+  int64_t spectral_residue_bits;
 
 } vorbis_dsp_state;
 
@@ -301,10 +301,10 @@ typedef struct vorbis_block{
   double *amp;
   oggpack_buffer opb;
   
-  int    pcm_channels;  /* allocated, not used */
-  int    pcm_storage;   /* allocated, not used */
-  int    floor_channels;
-  int    floor_storage;
+  int   pcm_channels;  /* allocated, not used */
+  int   pcm_storage;   /* allocated, not used */
+  int   floor_channels;
+  int   floor_storage;
 
   long  lW;
   long  W;
@@ -337,36 +337,36 @@ typedef struct vorbis_block{
 
 /* OggSquish BITSREAM PRIMITIVES: encoding **************************/
 
-extern int    ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
-extern int    ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
+extern int     ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op);
+extern int     ogg_stream_pageout(ogg_stream_state *os, ogg_page *og);
 
 /* OggSquish BITSREAM PRIMITIVES: decoding **************************/
 
-extern int    ogg_sync_init(ogg_sync_state *oy);
-extern int    ogg_sync_clear(ogg_sync_state *oy);
-extern int    ogg_sync_destroy(ogg_sync_state *oy);
-extern int    ogg_sync_reset(ogg_sync_state *oy);
+extern int     ogg_sync_init(ogg_sync_state *oy);
+extern int     ogg_sync_clear(ogg_sync_state *oy);
+extern int     ogg_sync_destroy(ogg_sync_state *oy);
+extern int     ogg_sync_reset(ogg_sync_state *oy);
 
-extern char  *ogg_sync_buffer(ogg_sync_state *oy, long size);
-extern int    ogg_sync_wrote(ogg_sync_state *oy, long bytes);
-extern long   ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
-extern int    ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
-extern int    ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
-extern int    ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
+extern char   *ogg_sync_buffer(ogg_sync_state *oy, long size);
+extern int     ogg_sync_wrote(ogg_sync_state *oy, long bytes);
+extern long    ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og);
+extern int     ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og);
+extern int     ogg_stream_pagein(ogg_stream_state *os, ogg_page *og);
+extern int     ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
 
 /* OggSquish BITSREAM PRIMITIVES: general ***************************/
 
-extern int    ogg_stream_init(ogg_stream_state *os,int serialno);
-extern int    ogg_stream_clear(ogg_stream_state *os);
-extern int    ogg_stream_reset(ogg_stream_state *os,long expected_pageno);
-extern int    ogg_stream_destroy(ogg_stream_state *os);
-extern int    ogg_stream_eof(ogg_stream_state *os);
+extern int     ogg_stream_init(ogg_stream_state *os,int serialno);
+extern int     ogg_stream_clear(ogg_stream_state *os);
+extern int     ogg_stream_reset(ogg_stream_state *os,long expected_pageno);
+extern int     ogg_stream_destroy(ogg_stream_state *os);
+extern int     ogg_stream_eof(ogg_stream_state *os);
 
 extern int     ogg_page_version(ogg_page *og);
 extern int     ogg_page_continued(ogg_page *og);
 extern int     ogg_page_bos(ogg_page *og);
 extern int     ogg_page_eos(ogg_page *og);
-extern size64  ogg_page_frameno(ogg_page *og);
+extern int64_t ogg_page_frameno(ogg_page *og);
 extern int     ogg_page_serialno(ogg_page *og);
 extern int     ogg_page_pageno(ogg_page *og);
 
@@ -396,7 +396,7 @@ extern int      vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
 extern int      vorbis_analysis(vorbis_block *vb,ogg_packet *op);
 
 /* Vorbis PRIMITIVES: synthesis layer *******************************/
-extern int  vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
+extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
 
 extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
 extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);